1
PRACTICAL FILE ON DATABASE MANAGEMENT
SYSTEMS LAB
UNIVERSITY INSTITUTE OF ENGINEERING AND TECHNOLOGY
KURURKSHETRA UNIVERSITY (KURUKSHETRA)
Session 2019-2023
Submitted to: - Submitted by: -
Dr. Karambir Name: - Mehak
Assistant professor Roll No.: - 251902135
C.S.E. Department CSE-B (V Semester)
INDEX
2
S.No AIM PAGE NO SIGNATURE
01 Write the queries for Data 4-7
Definition (DDL) in
RDBMS.
02 Write the queries for Data 8-10
Manipulation Language
(DML) in RDBMS.
03 Write the queries for Data 11-15
Control Language (DCL) in
RDBMS.
04 To perform various integrity 16-17
constraints on relational
database
05 Create a database and 18-21
perform the following
operations:
• Arithmetic and
• Relational operations
• Group by & having
clauses
• Like predicate for
pattern matching in
database
06 Write SQL queries for 22-24
relational algebra.
07 Write SQL queries for 25-26
extracting data from more
than one table.
3
08 Write SQL queries for sub 27-27
queries, nested queries.
09 Concepts for ROLL BACK, 28-28
COMMIT & CHECK
POINTS
10 Using two tables create a 29-29
view, which shall perform
natural join, equi join, outer
joins.
11 11. Write a procedure for 30-31
computing income tax of
employee on the basic of
following conditions:-
1. a. if gross
pay<=40,000 then I.T rate is
0%.
2. b. if gross
pay>40,000 but <60000 then
I.T rate is 10%.
3. c. if gross
pay>60,000 but <1,00,0000
then I.T rate is 20%.
4. d. if gross
pay>1,00,0000 then I.T rate
is 30%.
For this purpose create a
table with name, ssn, gross
salary and income tax of the
employee.
12 Write trigger for before and 32-33
after insertion, deletion and
updation process.
4
PRACTICAL – 1
Write the queries for Data Definition (DDL) in RDBMS
DDL COMMANDS :
• CREATE
• ALTER
• TRUNCATE
• DROP
5
6
7
8
PRACTICAL – 2
Write the queries for Data Manipulation Language (DML) in
RDBMS
DML COMMANDS :
• INSERT
• SELECT
• UPDATE
• DELETE
9
10
11
PRACTICAL – 3
Write the queries for Data Control Language (DCL) in
RDBMS
• GRANT: This command gives users access privileges to the database.
• REVOKE: This command withdraws the user’s access privileges given
by using the GRANT command
12
13
14
15
16
PRACTICAL
NO. 4
To perform various integrity constraints on relational database.
17
18
Practical No. 5
Create a database and perform the following operations: -
a. Arithmetic and
b. Relational operations
c. Group by & having clauses
Like predicate for pattern matching in database
19
20
21
22
PRACTICAL – 6
Write SQL queries for relational algebra.
.
23
24
.
25
PRACTICAL – 7
Write SQL queries for extracting data from more than one table.
26
27
PRACTICAL – 8
Write SQL queries for sub queries, nested queries.
28
PRACTICAL NO. 9
Concepts for ROLL BACK, COMMIT & CHECK POINTS.
PRACTICAL NO. 10
Using two tables create a view, which shall perform natural join, equi
join, outer joins.
29
30
PRACTICAL NO. 11
Write a procedure for computing income tax of employee on the
basic of following conditions: - a. if gross pay<=40,000 then I.T
rate is 0%.
b. if gross pay>40,000 but <60000 then I.T rate is 10%.
c. if gross pay>60,000 but <1,00,0000 then I.T rate is 20%.
d. if gross pay>1,00,0000 then I.T rate is 30%.
For this purpose, create a table with name, ssn, gross salary and income
tax of the employee.
31
32
PRACTICAL NO. 12
Name of the practical: - Write trigger for before and after insertion,
deletion and updation process.
33