DBMS Lab Manual
DBMS Lab Manual
Laboratory Manual
Submitted by : Submitted to :
Name :
Enroll. No. : Mr. Ashish Dubey
Division :
Roll No. :
Faculty of Engineering & Technology
303105204 – DBMS
CERTIFICATE
This is to certify that
Mr./Ms. with
year 2024 - 25
Head of Department
Faculty of Engineering & Technology
303105204 – DBMS
INDEX
Subject : DBMS Class: 2nd Year / 3rd Semester
Subject Code: 303105204 Academic Year: 2024 - 2025
Page No. Date Date
S.No. Practical Title of of Marks Sign
From To Perf. Sub.
Simple Queries:
(1) Describe deposit, branch.
(2) Describe borrow, customers.
(3) List all data from table
DEPOSIT.
(4) List all data from table
BORROW.
(5) List all data from table
03. CUSTOMERS.
(6) List all data from table
BRANCH.
(7) Give account no and amount
of depositors.
(8) List all data from SAILORS.
(8) List Boat Name and its color.
(9) List Employee name and its
city.
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
INDEX
Subject : DBMS Class: 2nd Year / 3rd Semester
Subject Code: 303105204 Academic Year: 2024 - 2025
Page No. Date Date
S.No. Practical Title of of Marks Sign
From To Perf. Sub.
(10) List all the details of Clients.
(11) Describe various products and
its price.
(12) Describe sailor’s name, age and
its rating.
(13) Describe the managers of
various employees.
(14) Describe the details of Loan for
customers.
(15) Describe the date of travel of
various sailors.
Simple Queries:
(1) Give name of depositors
having amount greater than
4000.
(2) List the employees having
salary less than 22000.
(3) List the sailors having age
more than 25.
(4) List the boats travelling on
10-oct-98
04. (5) List the details of boat
“Interlake”.
(6) List the details of the red
colored boat.
(7) List the details of clients
whose city is Mumbai
(8) List Client Name, due
balance and city of the clients
having balance greater than
1500.
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
INDEX
Subject : DBMS Class: 2nd Year / 3rd Semester
Subject Code: 303105204 Academic Year: 2024 - 2025
Page No. Date Date
S.No. Practical Title of of Marks Sign
From To Perf. Sub.
(9) Describe the details of products
having selling price less than 500.
(10) List the products for which
quantity ordered is less than 120
and cost price is greater than 250.
(11) Display account details having
amount greater 2200.
(12) Display all the customers
staying in Nagpur
(13) Display the names of sailors
having rating greater than 7
(14) Display the orders made in the
month of June
(15) List all the accounts created in
the month of March.
“Like” Queries:
(1) Display all customers whose
name start with ‘M’.
(2) Display all the customers
whose name ends with ‘L’.
(3) Display all loan details
whose branch starts with ‘A’.
(4) Display the details of sailors
whose name is minimum 6
05.
characters long.
(5) Display the details of
Employees whose address starts
with ‘S’.
(6) List the details of the boat
ending with ‘e’.
(7) List the details of clients
having ‘h’ as a 3rd character in
his/her name.
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
INDEX
Subject : DBMS Class: 2nd Year / 3rd Semester
Subject Code: 303105204 Academic Year: 2024 - 2025
Page No. Date Date
S.No. Practical Title of of Marks Sign
From To Perf. Sub.
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
INDEX
Subject : DBMS Class: 2nd Year / 3rd Semester
Subject Code: 303105204 Academic Year: 2024 - 2025
Page No. Date Date
S.No. Practical Title of of Marks Sign
From To Perf. Sub.
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
INDEX
Subject : DBMS Class: 2nd Year / 3rd Semester
Subject Code: 303105204 Academic Year: 2024 - 2025
Page No. Date Date
S.No. Practical Title of of Marks Sign
From To Perf. Sub.
“Join” Queries:
(1) Display all the employee
name and the city where they
work.
(2) Display the employee name
and company’s name having
salary more than 15000.
(3) Find the average rating and
age of all sailors.
08. (4) List various products
available.
(5) Display the names of
salesman who have salary more
than 2850.
(6) Change the cost price of
Trousers to 950
(7) List all the clients having “a”
as a second character in their
names.
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
INDEX
Subject : DBMS Class: 2nd Year / 3rd Semester
Subject Code: 303105204 Academic Year: 2024 - 2025
Page No. Date Date
S.No. Practical Title of of Marks Sign
From To Perf. Sub.
“Miscellaneous” Queries:
(1) Find the average rate for
each Order.
(2) Give the loan details of all
the customers.
(3) List the customer name
having loan account in the same
09. branch city they live in.
(4) Provide the loan details of all
the customers who have
opened their accounts after
August’95.
(5) List the order information
for client C00001 and C00002.
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
INDEX
Subject : DBMS Class: 2nd Year / 3rd Semester
Subject Code: 303105204 Academic Year: 2024 - 2025
Page No. Date Date
S.No. Practical Title of of Marks Sign
From To Perf. Sub.
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
INDEX
Subject : DBMS Class: 2nd Year / 3rd Semester
Subject Code: 303105204 Academic Year: 2024 - 2025
Page No. Date Date
S.No. Practical Title of of Marks Sign
From To Perf. Sub.
PL/SQL Block
(1) Write a PL/SQL Block to Add 2
Numbers
(2) Write a PL/SQL Block to find
Area of Rectangle, Triangle and
Square.
10. (3) Write a PL/SQL Block to find
Maximum of 3 numbers
(4) Write a PL/SQL Block to print
sum of N Numbers using For Loop.
(5) Write a PL/SQL Block to generate
Fibonacci series of N numbers
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 1 ]
1.1. What is DBMS? Explain advantages of DBMS over FPS.
A Database Management System (DBMS) is a software system that
is designed to manage and organize data in a structured manner. It
allows users to create, modify, and query a database, as well as
manage the security and access controls for that database.
It manages data, the database engine, and the database schema to
facilitate the organization and manipulation of data. Examples of
DBMS include MySQL, PostgreSQL, MongoDB, and Oracle.
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
4. Data Security:
• FPS: Security is handled by individual applications, leading to
inconsistent and potentially weak security measures.
• DBMS: Provides robust security features such as user
authentication, access control, and encryption to protect data.
5. Data Independence:
• FPS: Changes in data structure require changes to the
application programs.
• DBMS: Provides data abstraction and independence, allowing
changes to the database structure without altering application
programs.
6. Backup and Recovery:
• FPS: Backup and recovery processes are manual and can be
cumbersome.
• DBMS: Automated backup and recovery mechanisms ensure
data is safe and can be restored in case of failure.
7. Concurrent Access:
• FPS: Managing concurrent data access is complex and often
leads to data conflicts.
• DBMS: Manages concurrent data access efficiently, ensuring
transactions are processed reliably.
8. Reduced Development Time:
• FPS: Developing and maintaining file processing systems is
time consuming due to the need for managing data manually.
• DBMS: Standardized procedures and tools in a DBMS simplify
development and maintenance.
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 1 ]
1.2. List 15 applications of Database. Explain any 2 how Database
can be helpful in managing that application?
Applications of Databases:
A. Banking:
B. Healthcare:
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 1 ]
1.3.Create the Database for the following:
A. Student Details using Excel.
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 1 ]
1.3.Create the Database for the following:
B. Employees Details using MS Access.
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 1 ]
1.3.Create the Database for the following:
C. Facebook using Excel.
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 2 ]
2. Create following Tables:
Important Instructions:
• Use varchar2(30) datatype for Alphanumeric Characters and
Special Symbols, number datatype for Numbers, date datatype
for Date.
• Use same table and column name (Capital and Small Case) as
mentioned in this file.
• Insert proper data (Capital and Small Case) as mentioned in this
file.
Table 1 : Employee
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
Table 2 : Work
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
Table 5 : Sailors
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
Table 7 : Boats
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
Table 8 : Client
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
Table 9 : Product
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
Table 10 : Salesman
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
Table 11 : Salesorder
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
Table 12 : Salesorder_Details
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
Table 13 : Deposit
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
Table 14 : Borrow
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
Table 15 : Branch
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
Table 16 : Customers
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 3 ]
Simple Queries:
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 3 ]
(3) List all data from table DEPOSIT.
Select * from Deposit;
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 3 ]
(5) List all data from table CUSTOMERS.
Select * from Customers;
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 3 ]
(7) Give account number and amount of depositors.
Select Act_no, Amount from Deposit;
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 3 ]
(9) List Boat Name and its color.
Select Bname, Color from Boats;
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 3 ]
(12) Describe various products and its price.
Select Dscr, Sell_Price, Cost_Price from Product;
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 3 ]
(14) Describe the managers of various employees.
Select Emp_name, Man_name from Manager;
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 3 ]
(16) Describe the date of travel of various sailors
SELECT Sailors.Sid, Sailors.Sname, Reserves.Day
FROM Sailors
INNER JOIN Reserves ON Sailors.Sid = Reserves.Sid;
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 4 ]
Simple Queries:
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 4 ]
Simple Queries:
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 4 ]
Simple Queries:
(8) List Client Name, due balance and city of the clients having
balance greater than 1500.
Select Name, Baldue, City from Client where Baldue>1500;
(9) Describe the details of products having selling price less than
500.
Select Pr_no, Dscr from Product where Sell_Price< 500;
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 4 ]
Simple Queries:
(10) List the products for which quantity ordered is less than 120 and
cost price is greater than 250
Select Pr_no, Dscr from Product where Reorder_Lvl250;.
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 4 ]
Simple Queries:
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 5 ]
LIKE Queries:
(2) Display all the customers whose name ends with ‘L’.
Select Cname from Customers where Cname Like ‘%L’;
(3) Display all loan details whose branch starts with ‘A’.
Select * from Borrow where Bname Like ‘A%’;
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 5 ]
LIKE Queries:
(5) Display the details of Employees whose address starts with ‘S’.
Select * from Employee where Street Like ‘S%’;
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 5 ]
LIKE Queries:
(7) List the details of clients having ‘h’ as a 3rd character in his/her
name.
Select * from Client where Name Like ‘__h%’;
(8) List Client Name, due balance and city whose pin code starts
with 4.
Select Name, Baldue, City from Client where Pincode Like ‘4%’;
(9) List all customers whose city contains ‘a’ as second character.
Select Cname from Customers where City Like ‘_a%’;
Enrollment No. :
Faculty of Engineering & Technology
303105204 – DBMS
[ Practical 5 ]
LIKE Queries:
(10) List client names and city whose state has ‘a’ as fourth or fifth
character.
Select Name, City from Client where State Like ‘___a%’
Enrollment No. :