0% found this document useful (0 votes)
6 views7 pages

DBMS_Practical

The document outlines a practical course on Database Management Systems at DAVV, Indore, focusing on SQL, PL/SQL, and MongoDB. It includes course outcomes, installation instructions, and a series of exercises for creating and manipulating database tables, along with various SQL queries. The course also features a case study for a student progress monitoring system, emphasizing real-life application of database concepts.

Uploaded by

rajreena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views7 pages

DBMS_Practical

The document outlines a practical course on Database Management Systems at DAVV, Indore, focusing on SQL, PL/SQL, and MongoDB. It includes course outcomes, installation instructions, and a series of exercises for creating and manipulating database tables, along with various SQL queries. The course also features a case study for a student progress monitoring system, emphasizing real-life application of database concepts.

Uploaded by

rajreena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

School of Computer Science & Information Technology, DAVV, Indore

CS-4405: Database Management System - Practical


Aim: Enable student to design database and information retrieval concepts and apply these
concepts in complex projects involving large database.

Course Outcomes (COs):

CO1: Knowledge of SQL queries and relational algebra.

CO2: Apply normalization techniques for refining of databases.

CO3: Construct triggers, procedures, function, packages and cursors using PL/SQL.

CO4: Construct database for Case Study/ Real Life Problem.

CO5: Knowledge of MongoDB queries.

Week-I & II No. of Hours: 8

Oracle Installation.
Create tables according to the following definition

1. Deposit (actno, cname, bname, amount, adate)


2. Branch (bname, city)
3. Customer( cname , city)
4. Borrow( loanno, cname, bname, amount)
actno cname bname amount adate
100 Anil VRCE 1000 1-mar-2005
101 Sunil Ajni 5000 4-jan-2006
102 Mehul Karolbagh 3500 17-nov-2005
104 Madhuri Chandani 1200 17-dec-2006
105 Pramod M.G road 3000 27-mar-2006
106 Sandip Andheri 2000 31-mar-2006
107 Shivani Virar 1000 5-sep-2005
108 Kranti Nehru place 5000 2-jul-2005
109 Naren Powai 7000 10-aug-2005
Table : Deposit
bname City
VRCE Nagpur
Ajni Nagpur
Karolbagh Delhi
Chandani Delhi
Dharmpheth Nagpur
M.G road Banglore
Andheri Bombay
Virar Bombay
Nehru place Delhi
Powai Bombay
Table: Branch
School of Computer Science & Information Technology, DAVV, Indore
cname city
Anil Calcultta
Sunil Delhi
Mehul Baroda
Mandar Patna
Mahuri Nagpur
Pramod Nagpur
Sandip Surat
Shivani Bombay
Kranti Bombay
Naren Bombay
Table: Customer

loanno cname bname Amount


201 Anil VRCE 1000
206 Mehul Ajni 5000
311 Sunil Dharampeth 3000
321 Madhuri Andheri 2000
375 Pramod Virar 8000
481 Kranti Nehru place 3000
Table: Borrow

Selecting Data from Single Table

1. List all the data from table deposit.


2. List all the data from table borrow.
3. List all the data from table customer.
4. List all the data from table branch.
5. Give account no. and amount of depositors.
6. Give cname and account no. of depositors.
7. Give names of customers.
8. Give names of branches.
9. Give names of borrowers
10. Give names of customers living in city Nagpur.
11. Give names of depositors having amount greater than 4000.
12. Give account date of customer Anil.
13. Give names of all branches located in city Bombay.
14. Give names of borrower having loan no. 206.
15. Give names of depositor having account at VCRE.
16. Give names of all branches located in Delhi;
17. Give account number and deposit amount of customer having account opened
between1-12-2005 and 1-6-2005.
18. Give details of customer Anil.
19. Give name of the city where branch Karolbagh is located.

Week-III & IV No. of Hours: 8

Join and Cartesian product

1. Give name of customer having living city Bombay and branch city Delhi.
School of Computer Science & Information Technology, DAVV, Indore
2. Give name of customers having same living city as their branch city.
3. Give names of customers who are borrowers as well as depositors and having living
city Nagpur.
4. Give names of customers who are depositors and having the same branch city as
that of Sunil.
5. Give the names of depositors having the same city as that of Shivani and having
deposit amount greater than 2000.
6. Give the names of borrowers having deposit amount greater than 1000 and the loan
amount greater than 2000.
7. Give names of depositors having the same branch as the branch of sunil.
8. Give names of borrowers having loan amount greater than the loan amount of Anil.
9. Give the names of customers living city where branch of depositor sunil is located.
10. Give loan no and loan amount of borrower having the same branch as that of
depositor sunil.
11. Give loan no., loan amount, account no. and deposit amount of customers living in
city Nagpur.
12. Give loan no., loan amount , account no. and deposit amount of customers having
deposit branch located in Delhi
13. Give loan no., loan amount, account no., deposit amount, branch name, branch city
and living city of Pramod.
14. Give deposit details and loan details of customer in the city where Pramod is living.
15. Give name of depositors having the same branch city as that of sunil and having the
same living city as that of Anil.
16. Give names of depositors having amount greater than 1000 and having the same
living city as Pramod.
17. Give city of customer having the same branch city as that of Pramod.
18. Give branch city and living city of Pramod.
19. Give branch city of Sunil or branch city of Anil.
20. Give the living city of Anil and living city of Sunil.

Set operations

1. List all the customers who are depositors but not borrowers.
2. List all the customers who are both depositors and borrowers.
3. List all the customers, along with their amount, who are either borrowers or
depositors and living in city Nagpur.
4. List all the depositors having in all the branches where Sunil is having account.
5. List all the customers living in city Nagpur and having branch city Bombay or Delhi.
6. List all the depositors living in city Nagpur.
7. List all the depositors living in city Nagpur and having branch in city Delhi.
8. List the branch cities of Anil and Sunil.
9. List the borrowers having branch city same as that of Sunil.
10. List the customer having deposit greater than 1000 and loan less than 10000.
11. List the borrowers having branch city same as that of Sunil.
12. List the cities of depositors having branch VRCE.
School of Computer Science & Information Technology, DAVV, Indore
13. List the depositors having the same living city as that of Sunil and the same branch
city as that of Anil.
14. List the depositors having amount less than 8000 and living in the same city as Ms.
Shivani.
15. List all the customers who are both depositors and borrowers and living in the same
city as Anil.
16. List all the cities where branches of Anil and Sunil are located.
17. List all the customer names and the amount for depositors living in the city where
either Anil or Sunil is living.
18. List the amount for the depositors living in the city where Anil is living.
19. List the cities which are either branch city of Anil or living city of Sunil.
20. List the customers who are borrowers and depositors and having living city Bombay
and branch city same as that of Sandip.
21. List the customers who are both borrowers and depositors and having the same
branch city as that of Anil.

Week-V & VI No. of Hours: 8

1. List total loan.


2. List total deposit
3. List total loan taken from Andheri branch.
4. List total deposit of customer having account date later than 1-Jan-2006.
5. List total deposit of customers living in city Nagpur.
6. List maximum deposit of customer living in Bombay.
7. List total deposit of customers having branch city Delhi.
8. List total deposit of customers living in the city where Sunil is living.
9. Count total number of branch cities.
10. Count total number of customer cities.
11. Give branch name and branch-wise deposit.
12. Give city name and city wise deposit.
13. Give city wise name and branch wise deposit.
14. Give the branch wise deposit of customer after account date 1-jan -2006.
15. Give branch wise loan of customer living in Nagpur.
16. Count total no. of customers.
17. Count total no. of depositor branch wise.
18. Give maximum loan from branch VRCE.
19. Give living city wise loan of borrowers.
20. Give the number of customers who are depositor as well as borrowers.

Group by and having Clause

1. List the branches having sum of deposit more than 4000.


2. List the branches having a sum deposit more than 1000 and location in city Bombay.
3. List the names of customers having deposit in the branches where the average
deposit is more than 1000.
4. List the name of customers having maximum deposit.
School of Computer Science & Information Technology, DAVV, Indore
5. List the name of customers having maximum deposit in the customers living in
Nagpur.
6. List the name of branch having highest number of depositors.
7. Count the number of depositors living in Nagpur.
8. Give the name of customers in Powai branch having more deposit than all customer
VRCE branch.
9. Give names of customers in Karolbagh branch having more deposit than any other in
Virar branch.
10. Give names of customers having highest deposit in the branch where Sunil is having
deposit.
11. Give the highest deposit of the city where branch of Sunil is located.
12. Give names of customers having more deposit than the average depoait in their
respective branches.
13. Give names of customers having maximum deposit among deposits of Nagpur for
branch VRCE.
14. Give the name of branch where name of depositors is less than 2.
15. Give name and city having more customers living in than Nagpur.
16. Give names of branches having the number of depositors more than the number of
borrowers.
17. Give the names of customers living in the city where the maximum numbers of
depositors are located.
18. Give the name of cities in which the maximum numbers of branches are located.
19. Give the names of borrowers having the same branch city and highest borrower.
20. Count the number of customers living in the city where branch is located.

Week-VII & VIII No. of Hours: 8

1. Give 10% interest to all depositors.


2. Give 10% interest to all depositors having branch vrce.
3. Give 10% interest to all depositors living in Nagpur.
4. Give 10% interest to all depositors living in Nagpur and having branch in city Bombay.
5. Add hundred rupees to the deposit of Anil and assign it to Sunil.
6. Change the deposit of VCRE branch to 1000 and change the branch as
VCRE_Ambhazari.
7. Assign to all deposit of Anil the maximum deposit from VRCE branch.
8. Change the living city of VRCE branch borrowers to Nagpur.
9. Update deposit of Anil give him maximum deposit from depositors in living city
Nagpur.
10. Deposit the sum of the deposits of Sunil and Vijay in an account of Anil.
11. Transfer Rs 10 from the account of Anil to the account of Sunil.
12. Transfer Rs 10 from the account of Anil to the account of Sunil if both are having the
same branch.
13. Transfer Rs 10 from the account of Madhuri to the account of Parmod if both are
lining in Nagpur.
14. Delete from customer.
15. Delete depositors of branches having number of customer between 1 and 3.
School of Computer Science & Information Technology, DAVV, Indore
16. Delete branches having average deposit less than 5000.
17. Delete branches having maximum loan more than 5000.
18. Delete branches having deposit from Nagpur.
19. Delete deposit of Anil and Sunil if both are having branch Virar.
20. Delete deposit of Anil and Sunil if both are having living city Nagpur.
21. Delete deposit of Anil and Sunil if both are having same living city.
22. Delete deposit of Anil and Sunil if they are having less deposit than Vijay.
23. Delete deposit of Vijay.
24. Delete deposit of Ajay if Vijay is not a depositor.
25. Delete customer from Bombay city.
26. Delete depositors if the branch is Virar and depositor name is Ajay.
27. Delete depositors having deposit less than 500.
28. Delete borrower having loan more than 10000.
29. Delete borrower having loan more than 10000 and branch Karolbagh.
30. Delete the names of those depositors of VRCE branch who live in the city Bombay.
31. Delete borrower having branch name Chandani.
32. Delete borrower of branches having average loan less than 1000.
33. Delete borrower of branches having the minimum number of customers.

Week- IX & X No. of Hours: 8

1. PLSQL code to find sum of two numbers


2. PLSQL code to print Fibonacci series
3. PLSQL code to find whether given number is even or odd
4. Create function to display square of given number.
5. Create procedure to display division of student.
6. Create package having one procedure to add two numbers and one function to
subtract two numbers.
7. Demonstrate cursor.
8. Demonstrate trigger.
9. CASE STUDY: STUDENT PROGRESS MONITORING SYSTEM
A database is to be designed for a college to monitor students' progress throughout
their course of study. The students are reading for a degree (such as BA, BCA(Hons)
MSc, etc) within the framework of the modular system. The college provides a
number of modules, each being characterised by its code, title, credit value, module
leader, teaching staff and the department they come from. A module is co- ordinated
by a module leader who shares teaching duties with one or more lecturers. A
lecturer may teach (and be a module leader for) more than one module. Students
are free to choose any module they wish but the following rules must be observed:
some modules require pre-requisites modules and some degree programmes have
compulsory modules. The database is also to contain some information about
students including their numbers, names, addresses, degrees they read for, and their
past performance (i.e. modules taken and examination results).
10. Illustration of Where Clause, AND, OR operations in MongoDB.
11. Execute the Commands of MongoDB and operations in MongoDB : Insert, Query,
Update, Delete and Projection. (Note: use any collection)
School of Computer Science & Information Technology, DAVV, Indore
Text Books:

1. NoSQL Distilled- Pramod J. Sadalage, Martin Fowler, Addison-Wesley, 2013


2. SQL, PL/SQL The programming language of Oracle-Ivan Bayross

Reference Book(s):

1. Oracle Database 10g: The Complete reference, Kevin Loney.

Online Resources:

1. https://onlinecourses.nptel.ac.in/noc22_cs91
2. https://onlinecourses.swayam2.ac.in/cec19_cs05

You might also like