New DBMS Lab - Course Plan 2014
New DBMS Lab - Course Plan 2014
F01 (B)
Issue No.04 Rev. No 4 Dated: June 7, 2014
_____________________________________________________________________________________________
COURSE PLAN
Programme
Course
Subject Code
: CSEG215
No. of credits
:1
Semester
: III
Session
: Odd Semester(July14-Dec14)
Batch
: 2013-2017
Prepared by
: Ankit Khare
Approved By
_______________________
HOD
_______________________
Dean
UPES Campus
Tel : +91-135-2770137
Energy Acres
Website : www.upes.ac.in
COURSE PLAN
Subject: Database Management
System
Course:
Btech(CSE+All
IBM Courses)
Duration:July14-Dec14
Subject code:
CSEG215
One Session: 120 Minutes per batch
A. OBJECTIVES:
(a) The student should be able to design Simple query statements by the use of Oracle interface. The
student should be able to design queries with phrases like where, order by statements etc. The
student should be able to understand the use of views, and design them.
(b) The student should be able to understand the background working of Oracle, by learning Oracle
Architecture and its background processes. Overall the student should appreciate the use of DBMS
systems for effective data management.
B. COURSE OUTLINE
S.No Lab Exercise
Contents
1.
Lab. Exercise 1
DB2 installation
2.
Lab. Exercise 2
3.
Lab. Exercise 3
4.
Lab. Exercise 4
5.
Lab. Exercise 5
6.
Lab. Exercise 6
7.
Lab. Exercise 7
8.
Lab. Exercise 8
9.
Lab. Exercise 9
10.
Lab. Exercise 10
C. PEDAGOGY
Knowledge about the basic terminology used in structured query language, have a clear idea
about fundaments as well as Practical concept of database..
D. COURSE COMPLETION PLAN
S.no No. of
No. of
No .of
experiments
experiments internal lab
planned
completed
tests
planned
1
10
2
No. of lab classes per batch planned: 12
No. of lab classes per batch taken:
Percentage of experiment covered:
No .of
internal lab
tests
conducted
No. of
internal
viva
planned
2
No. of
internal
viva
conducted
Weight age
Schedule
1.
Internal Examination
50%
Detailed Below
2.
External - Examination
50%
Academic Calendar
Note: Those who do not appear in Class test and quiz examinations shall lose their marks.
The marks obtained by the students will be displayed on ICOS a week before the start
of Mid Term and End Term Examinations respectively.
GENERAL DISCIPLINE: Based on students regularity, punctuality, sincerity, behavior and dress
code/sense in the lab.
The marks obtained by the students will be displayed on ICOS at the end of semester.
Experiment 1
TITLE: DB2 Installation
Objective: To understand how to install DB2 on Laptop.
1. Install DB2 on laptop.
Experiment 2
TITLE: DDL (Data Definition Language) commands
Objective: To understand the concept of designing issue related to the database with creating,
Populating the tables.
Varchar
Varchar
Varchar
Varchar
Varchar
Integer
Varchar
decimal
Size
6
20
30
30
15
15
10,2
data type
Size
PRODUCTNO
DESCRIPTION
PROFITPERCENT
UNIT MEASURE
QTYONHAND
REORDERL VL
SELLPRICE
COSTPRICE
Varchar
Varchar
Decimal
Varchar
Integer
Integer
Decimal
Decimal
6
15
4,2
10
8,2
8,2
Column name
data type
Size
SALESMANNO
SALESMANNAME
ADDRESS 1
Varchar
Varchar
Varchar
6
20
30
ADDRESS 2
CITY
PINCODE
STATE
SALAMT
TGTTOGET
YTDSALES
REMARKS
Varchar
Varchar
Integer
Varchar
Real
Decimal
Double
Varchar
30
20
20
6,2
60
Name
city
Pincode
state
BalDue
C00001
C00002
Ivan bayross
Mamta muzumdar
Mumbai
Madras
400054
780001
Maharashtra
Tamil nadu
15000
0
C00003
C00004
C00005
C00006
Chhaya bankar
Ashwini joshi
Hansel colaco
Deepak sharma
Mumbai
Bangalore
Mumbai
Mangalore
400057
560001
400060
560050
Maharashtra
Karnataka
Maharashtra
Karnataka
5000
0
2000
0
Description
Unit
measure
Piece
Piece
Piece
Piece
Piece
Piece
Piece
Qtyonhand
RecorderLvl
SellPrice
CostPrice
T-Shirt
Shirts
Cotton jeans
Jeans
Trousers
Pull Overs
Denim jeans
Profit
percent
5
6
5
5
2
2.5
4
P00001
P0345
P06734
P07865
P07868
P07885
P07965
200
150
100
100
150
80
100
50
50
20
20
50
30
40
350
500
600
750
850
700
350
250
350
450
500
550
450
250
P07975
P08865
Lycra tops
Skirts
5
5
Piece
Piece
70
75
30
30
300
450
175
300
Name
Aman
Omkar
Raj
Ashish
SalesmanNo
S00001
S00002
S00003
S00004
SalAmt
3000
3000
3000
3500
Address1
A/14
65
P-7
A/5
Address2
Worli
Nariman
Bandra
Juhu
TgtToGet
100
200
200
200
YtdSales
50
100
100
150
City
Mumbai
Mumbai
Mumbai
Mumbai
PinCode
400002
400001
400032
400044
State
Maharashtra
Maharashtra
Maharashtra
Maharashtr(a
Remarks
Good
Good
Good
Good
*****************************************************************************
Experiment 3
Title: DML commands with constraints
Objective: - To understand the concept of different DML commands.
1. Exercise on retrieving records from a table.
a. Find out the names of all the clients.
b. Retrieve the entire contents of the Client_Master table.
c. Retrieve the list of names,city and the state of all the clients.
d. List the various products available from the Product_Master table.
e. List all the clients who are located in Mumbai.
f. Find the names of salesman who have a salary equal to Rs.3000.
2. Exercise on updating records in a table
a. Change the city of ClientNo C00005 to Bangalore.
b. Change the BalDue of ClientNo C00001 to Rs.1000.
c. Change the cost price of Trousers to rs.950.00.
d. Change the city of the salesman to Pune.
b.
c.
Delete all products from Product_Master where the quantity on hand is equal to 100.
Delete from Client_Master where the column state holds the value Tamil Nadu.
***************************************************************
EXPERIMENT-4
TITLE: DDL (Data Definition Language) commands with Data Constraints
Objective: To understand the concept of data constraints which are enforced on data being stored in
the table. Focus on Primary Key and The Foreign Key
Varchar
Varchar
Varchar
Varchar
Varchar
Integer
Varchar
Decimal
Size
Constraints
6
20
30
30
15
8
15
10,2
data type
Size
Attributes
PRODUCTNO
DESCRIPTION
PROFITPERCENT
UNIT MEASURE
QTYONHAND
REORDERL VL
SELLPRICE
COSTPRICE
Varchar
Varchar
Decimal
Varchar
Integer
Integer
Decimal
Decimal
6
15
4,2
10
8
8
8,2
8,2
Column name
data type
Size
Attributes
SALESMANNO
SALESMANNAME
ADDRESS 1
ADDRESS 2
CITY
PINCODE
STATE
SALAMT
TGTTOGET
YTDSALES
REMARKS
Varchar
Varchar
Varchar
Varchar
Varchar
Integer
Varchar
Real
Decimal
Double
Varchar
6
20
30
30
20
8
20
8,2
6,2
6,2
60
EXPERIMENT-5
TITLE: DDL (Data Definition Language) commands with Data Constraints
Objective: To understand the concept of data constraints which are enforced on data being stored in
the table. Focus on Primary Key , The Foreign Key and constraints.
Review this diagram
Where:
Author_ID text data type, 5 characters, referenced by Author_ID from AUTHOR
table
Book_ID text data type, 5 characters
Role text data type, 15 characters
and primary key is: Author_ID, Book_ID
***************************************************************
EXPERIMENT- 6,7
Title: Use of Inbuilt functions and relational algebra operation
Objective: To understand the use of inbuilt function and relational algebra with sql query.
1. Consider the following table structure and attempt.
Supplier-(scode,sname,scity,turnover)
Part-(pcode,weigh,color,cost,sellingprice)
Supplier_Part-(scode,pcode,qty)
a) create tables
b) populate the table.
EXPERIMENT-8,9
TITLE: Nested sql queries or Subquries
Objective: To understand the use SQL Subquery
ENAME
JOB
----------
----------
---------
MGR
HIREDATE
SAL
COMM
----------
DEPTNO
7369
SMITH
CLERK
7902
17-DEC-80
800
20
7499
ALLEN
SALESMAN
7698
20-FEB-81
1600
300
30
7521
WARD
SALESMAN
7698
22-FEB-81
1250
500
30
7566
JONES
MANAGER
7839
02-APR-81
2975
7654
MARTIN
SALESMAN
7698
28-SEP-81
1250
7698
BLAKE
MANAGER
7839
01-MAY-81
2850
20
1400
30
30
7782
CLARK
MANAGER
7788
SCOTT
ANALYST
7839
KING
PRESIDENT
7844
TURNER
SALESMAN
7876
ADAMS
7900
7839
09-JUN-81
7566
2450
10
09-DEC-82
3000
20
17-NOV-81
5000
10
7698
08-SEP-81
1500
CLERK
7788
12-JAN-83
1100
20
JAMES
CLERK
7698
03-DEC-81
950
30
7902
FORD
ANALYST
7566
03-DEC-81
3000
20
7934
MILLER
CLERK
7782
23-JAN-82
1300
10
30
DEPT TABLE
DEPTNO
DNAME
----------
--------------
LOC
-------------
10
ACCOUNTING
NEW YORK
20
RESEARCH
DALLAS
30
SALES
CHICAGO
40
OPERATIONS
BOSTON
1. List the details of the emps whose Salaries more than the employee BLAKE.
2. List the emps whose Jobs are same as ALLEN.
3. List the Emps whose Sal is same as FORD or SMITH in desc order of Sal.
4. List the emps Whose Jobs are same as MILLER or Sal is more than ALLEN.
5. Find the highest paid employee of sales department.
6. List the employees who are senior to most recently hired employee working under
king.
7. List the names of the emps who are getting the highest sal dept wise.
8. List the emps whose sal is equal to the average of max and minimum
9. List the emps who joined in the company on the same date.
10. Find out the emps who joined in the company before their Managers.
****************************************************************
EXPERIMENT-10
TITLE: Group by & having clause
Objective: To understand the use of group by and having clause.
Write the SQL Queries for the following queries (use EMP and DEPT table of Exp 8).
1.
2. List the No.of emps and Avg salary within each department for each job.
3. Find the maximum average salary drawn for each job except for President.
4. List the department details where at least two emps are working.
5. List the no. of emps in each department where the no. is more than 3.
6. List the names of the emps who are getting the highest sal dept wise.
7.
List the Deptno and their average salaries for dept with the average salary less than the
averages for all department.
F. SUGGESTED READINGS:
Ref. 1: SQL, PL/SQL, The programming language of Oracle by Ivan Bayross, BPB
Publication.
Ref. 2: Introduction to Oracle SQL-Volume 1
GUIDELINES
Cell Phones and other Electronic Communication Devices: Cell phones and other electronic
communication devices (such as Blackberries/Laptops) are not permitted in classes during
Tests or the Mid/Final Examination. Such devices MUST be turned off in the lab classes
E-Mail and LMS: Each student in the class should have an e-mail id and a pass word to
access the LMS system regularly. Regularly, important information Date of conducting
class tests, guest lectures, via LMS. The best way to arrange meetings with us or ask specific
questions is by email and prior appointment. All the assignments preferably should be
uploaded on LMS. Various research papers/reference material will be mailed/uploaded on
LMS time to time.
Attendance: Students are required to have minimum attendance of 75% in each subject.
Students with less than said percentage shall NOT be allowed to appear in the end semester
examination.
Passing criterion: Student has to secure minimum 30%/40% marks of the highest marks in
the class scored by a student in that subject (in that class/group class) individually in both the
End-Semester examination and Total Marks in order to pass in that paper.
Passing Criterion for B. Tech: minimum 30% of the highest marks in the class
Passing Criterion for M. Tech: minimum 40% of the highest marks in the class