GUJARAT TECHNOLOGICAL UNIVERSITY
Program Name: Bachelor of Computer Applications
Level: Under Graduate
Course / Subject Code : BC02001021
Course / Subject Name : Database Management System
w. e. f. Academic Year: 2024-25
Semester: 2
Category of the Course: Core Courses
Prerequisite: Basic knowledge of working with computers
Rationale: ● To understand the fundamental concepts of Database Management Systems.
● To understand the concepts necessary for designing, using and implementing
database systems and applications
Course Outcome:
After completion of the course, student will able to:
No. Course Outcomes RBT
Level*
1 Describe the core concepts of DBMS & Differentiate various database architectures UN
2 Analyze database model and Design relational database using E-R model and UML AP
Classes
3 Normalize schema relations up to 4NF using concepts of functional dependency AP
4 Perform various relational algebra operations on various relational model/database AP
5 Develop transaction schedules to ensure recoverability and serializability in database AP
systems, applying the principles of transaction properties to maintain data consistency
and integrity in real-world scenarios.
Teaching and Examination Scheme:
Teaching Scheme Total Credits
Assessment Pattern and Marks
(in Hours) L+T+ (PR/2) Total
Theory Tutorial / Practical Marks
L T PR C
ESE (E) PA / CA (M) PA/CA (I) ESE (V)
3 0 2 4 70 30 20 30 150
Course Content:
Unit Content No. of Weightage
No. Hours (%)
1 Introduction to Database System 8 15%
Database and Users: Introduction (Basic Concepts: Data, Database,
Database systems, Database Management Systems), Characteristics of
w.e.f. 2024-25 http://syllabus.gtu.ac.in/ Page 1 of 10
GUJARAT TECHNOLOGICAL UNIVERSITY
Program Name: Bachelor of Computer Applications
Level: Under Graduate
Course / Subject Code : BC02001021
Course / Subject Name : Database Management System
Database Approach, Actors on Scene, Workers behind the Scene,
Advantages of using the DBMS approach
Database System Concepts and Architecture: Data Models, Schemas,
Instances, the three schema architectures and data independence,
Database Languages and interfaces, Database System environment,
Centralized and client / Server Architecture for DBMS, Classifications
of Database Management Systems.
2 Entity Relationship Diagram Using high level conceptual data models 2 20%
for database design (Design Phases of database design), Entity types,
Entity Sets, Attributes and keys, Relationship Types, Relationship sets,
Roles and structural constraints, Weak entity Types, Refining the ER
diagram for company Database, Entity Relationship Diagram Naming
conventions Design issues, Example of other Notation: UML class
diagram, Relationship types of degree higher than 2 Subclasses, Super
Classes, Inheritance Specialization and Generalization Relational
Database design by ER and EER to Relational Mapping
3 Database Design Informal Design Guidelines for Relational Schema, 12 25%
Functional Dependencies, Normal Forms based on Primary keys,
General definitions of 1NF, 2NF and 3NF, Boyce-Codd Normal Forms
(BCNF), Multi-valued Dependency and Fourth Normal Form.
4 Relational Model concepts: Relational Model concepts, Relational 10 25%
Model constraints and Relational Database Schemas Relational
Algebra: Unary Relational Operations (Select and Project), Relational
Algebra operations from Set Theory, Binary Relational Operations
(JOIN and Division) and Additional Relational Operations
(Generalized projection, aggregate functions and grouping, Recursive
Closure Operations, Outer Join Operations, the outer union operation).
5 Introduction to Transaction Processing Concepts: Introduction to 12 15%
Transaction Processing, Transaction and System concepts, Desirable
properties of Transactions, characterizing Schedule Based on
Recoverability and Serializability.
Total Hours: 45 100%
Suggested Specification Table with Marks (Theory):
Distribution of Theory Marks
R Level U Level A Level N Level E Level C Level
20% 30% 50% - - -
Where R: Remember; U: Understanding; A: Application, N: Analyze and E: Evaluate C: Create (as per
Revised Bloom’s Taxonomy)
w.e.f. 2024-25 http://syllabus.gtu.ac.in/ Page 2 of 10
GUJARAT TECHNOLOGICAL UNIVERSITY
Program Name: Bachelor of Computer Applications
Level: Under Graduate
Course / Subject Code : BC02001021
Course / Subject Name : Database Management System
References/Suggested Learning Resources:
(a) Textbook:
1. Ramez Elmsari,Shamkant B Navathe, “Fundamentals of Database Systems”, Pearson Education,
7th Edition.
2. Alexis Leon, Mathews Leon, “Essentials of Database Management Systems” (Second reprint
2009), Tata McGraw Hill Publication.
Reference Books:
1. C. J. Date, A. Kannan, S. Swamynathan, “An Introduction to Database Systems” 8 th Edition
(2006), Pearson Education
2. Silberschatz, Korth, Sudarshan, “Database System Concepts” 5 th Edition, McGraw Hill
3. S. K. Singh, “Database Systems: Concepts, Design and Applications”, Pearson Education
4. ORACLE PL/SQL by example. Benjamin Rosenzweig, Elena Silvestrova, Pearson Education
3rd Edition
5. Ramakrishnan, Gehrke, “Database Management Systems” 3rd Edition, McGraw Hill
6. Peter Rob, Carlos Coronel, “Database Systems: Design, Implementation and Management”, 7 th
Edition (2007), Cengage Learning
Suggested Course Practical List:
Tools: MySQL (any variant of MySQL like Maria DB etc.)
Topics:
1 Introduction to Database: MySQL, Installation, Data Types
2 Manage Database: Create Database, Drop Database, Select Database (MySQL> prompt)
3 Create Table:
The Create Table Command, Creating a table from a table (with data, without data, with all
columns, with selected columns)
Drop Table Alter Table
4 Study DML Commands ( Select, insert, update, delete )
5 Sorting Data, Handling Null values ( IS NULL)
6 Join
7 Like Clause , REGEXP
8 Transaction Control statements: Commit, Rollback
9 Advanced Concepts: View, Index, Sequences
10 Database Export / Import
11 Study single row functions: String functions, Numeric Functions, Date Functions
12 Study aggregate / group functions
13 Study sub query concepts
w.e.f. 2024-25 http://syllabus.gtu.ac.in/ Page 3 of 10
GUJARAT TECHNOLOGICAL UNIVERSITY
Program Name: Bachelor of Computer Applications
Level: Under Graduate
Course / Subject Code : BC02001021
Course / Subject Name : Database Management System
14 Constraints: Primary Key, Foreign Key, Check, Default, Not Null, Unique
15 Set Operators
16 Compound Statement Handling:
Syntax, Variables, flow of control, condition handling, Cursor Management, Create procedure
and Function
17 Create Triggers
18 Data dictionary
19 Security / privileges (Desirable)
References:
1. Steve Suehring, Tim Converse, Joyce Park, PHP 6 and MySQL Bible, Wiley
2. Andrea Tarr, PHP and MySQL 24-Hour Trainer, Wiley
Practicals to perform: (SQL and PL/SQL)
Set 1
DEPARTMENT (dept_no, dept_name, location)
1. Create the Simple DEPARTMENT Table.
2. Display structure of department table.
3. Insert below records into Department Table
Dept_no Dept_name Location
10 Account NY
20 HR NY
30 Production DL
40 Sales NY
50 EDP MU
60 TRG
110 RND AH
4. Display all records of Department table
5. Display all department belonging to location 'NY'
6. Display details of Department 10
7. List all department names starting with 'A'
8. List all departments whose number is between 1 and 100
9. Delete 'TRG' department
10. Change department name 'EDP' to 'IT
w.e.f. 2024-25 http://syllabus.gtu.ac.in/ Page 4 of 10
GUJARAT TECHNOLOGICAL UNIVERSITY
Program Name: Bachelor of Computer Applications
Level: Under Graduate
Course / Subject Code : BC02001021
Course / Subject Name : Database Management System
Set 2
EMPLOYEE (emp_id, emp_name, birth_date, gender, dept_no, address, designation, salary,
experience, email)
DEPARTMENT (dept_no, dept_name, location)
Do as directed:
Create the EMP Table with all necessary constraints such as In EMP TABLE: Employee id should be
primary key, Department no should be Foreign key, employee age (birth_date) should be greater than
18 years, salary should be greater than zero, email should have (@ and dot) sign in address,
designation of employee can be “manager”, “clerk”, “leader”, “analyst”, “designer”, “coder”, “tester”.
1. Create DEPT table with neccessary constraint such as
2. Department no should be primary key, department name should be unique.
3. After creation of above tables, modify Employee table by adding the constraints as
4. ‘Male’ or ‘Female’ in gender field and display the structure.
5. Insert proper data (at least 5 appropriate records) in all the tables.
6. Describe the structure of table created
7. List all records of each table in ascending order.
8. Delete the department whose loction is Ahmedabad.
9. Display female employee list
10. Display Departname wise employee Names
11. Find the names of the employee who has salary less than 5000 and greater than 2000.
12. Display the names and the designation of all female employee in descending order.
13. Display the names of all the employees who names starts with ‘A’ ends with ‘A’.
14. Find the name of employee and salary for those who had obtain minimum salary.
15. Add 10% raise in salary of all employees whose department is ‘IT’.
16. Count total number of employees of ‘IT’ department.
17. List all employees who born in the current month.
18. Print the record of employee and dept table as “Employee works in department ‘MBA’.
19. List names of employees who are fresher’s (less than 1 year of experience).
20. List department wise names of employees who has more than 5 years of experience.
21. Crete Sequence to generate department ID
22. List department having no employees
Set 3
Create the following table:
Salesmen table (SNUM, SNAME , CITY , COMMISSION)
Customers (CNUM, CNAME , CITY , RATING , SNUM)
Orders (ONUM, AMOUNT, ODATE, CNUM, SNUM)
w.e.f. 2024-25 http://syllabus.gtu.ac.in/ Page 5 of 10
GUJARAT TECHNOLOGICAL UNIVERSITY
Program Name: Bachelor of Computer Applications
Level: Under Graduate
Course / Subject Code : BC02001021
Course / Subject Name : Database Management System
SNUM : A unique number assigned to each salesman. SNAME :Thenameofsalesman.
CITY :Thelocationof salesmen. COMMISSION: The Salemen's commission on orders
CNUM : A unique number assigned to each customer. CNAME : The name of the customer. CITY :
The location of the customer. RATING : A level of preference indicator given to this customer.
SNUM : The number of salesman assigned to this customer.
ONUM : A unique number assigned to each order. AMOUNT : The amount of an order. ODATE : The
date of an order. CNUM : The number of customer making the order. SNUM : The number of
salesman credited with the sale.
Do as directed:
1. Write an Insert script for insertion of rows with substitution variables and insert appropriate data.
2. Produce the order no, amount and date of all orders.
3. Give all the information about all the customers with a specific salesman number.
4. Display the following information in the order of city, sname, snum and commission.
5. List of rating followed by the name of each customer in particular one city e.g. Surat.
6. List of snum of all salesmen with orders in order table without any duplicates.
7. List of all orders for more than certain amount e.g. more than Rs. 1000.
8. List of names and cities of all salesmen in one city e.g. London with commission above 10%.
9. List all customers whose names begins with a letter 'C'.
10. List all customers whose names begins with letter 'A' to'G'.
11. List all orders with zero or NULL amount.
12. Find out the largest orders of salesman from two value e.g. 1002 and 1007.
13. Count all orders of particular date e.g. October 3, 2023
14. Calculate the total amount ordered.
15. Calculate the average amount ordered.
16. Count the no. of salesmen currently having orders.
17. List all salesmen with their % of commission.
18. Assume each salesperson has a 15% commission. Write a query on the order table that will
produce the order number, salesman no and the amount of commission for that order
19. Find the highest rating in each city in the form : For the city (city), the highest rating is : (rating)
List all in descending order of rating.
20. Calculate the total of orders for each day and place the result in descending order.
21. Show the name of all customers with their salesman's name.
22. List all customers and salesmen who shared a same city.
23. List all orders with the names of their customer and salesman.
24. List all orders by the customers not located in the same city as their salesman.
25. List all customers serviced by salespeople with commission above 15%.
26. Calculate the amount of the salesman commission on each order by a customer with rating above
100.
w.e.f. 2024-25 http://syllabus.gtu.ac.in/ Page 6 of 10
GUJARAT TECHNOLOGICAL UNIVERSITY
Program Name: Bachelor of Computer Applications
Level: Under Graduate
Course / Subject Code : BC02001021
Course / Subject Name : Database Management System
27. Find all pairs of customers having the same rating without duplication.
28. List all orders that are greater than the average of October 4,2023.
29. Find the average commission of salesmen in London.
30. Find all orders attributed to salesmen in 'London' using both the subquery and join methods.
31. List the commission of all salesmen serving customers in 'London'.
32. Find all customers whose cnum is e.g. 1000 above than the snum of name e.g. Sejal.
33. Count the no. of customers with the rating above than the average of one city e.g. 'Surat'.
34. Find all salesmen with customers located in their cities using ANY and IN.
35. Find all salesmen for whom there are customers that follow them in alphabetical order.
36. Find all customers having rating greater than any customer in particular city e.g. 'Rajkot'.
37. List all orders that has amount greater than atleat one of the orders from 6th October, 2023.
38. Find all orders with amounts smaller than any amount for a customer in 'London'.
39. Find all the customers who have greater rating than every customer in one city e.g. 'Anand’
40. Create a union of two queries that shows the names, cities and ratings of all customers. Those
with rating of >=200 should display 'HIGH RATING' and those with < 200 should display 'LOW
RATING'.
41. Produce the name and number of each salesman and each customer with more than one current
order in the alphabetical order of names.
42. Create union of three queries. First select snum of all salesman in Surat, second, the cnum of all
customers in 'Surat' and third, the onum of all orders of 3rd Oct. Retain duplicates between the
last two queries but remove the duplicates between either of them and the first.
43. Remove all orders from customer Chirag from the orders table.
44. Set the ratings of all the customers of Piyush to 400.
45. Increase the rating of all customers in Rome by 100.
Set 4
a) Write a PLSQL block which will print Employee list (Empno and Name) EMP (empno, empnm,
empadd, salary, date_birth, joindt, deptno)
b) Write a function that returns total number of incomplete jobs, using table JOB (jobid, type_of_job,
status)
c) Write a function which displays the number of items whose weight fall between a given ranges
for a particular color using table ITEM (itemno, name, color, weight)
d) Write a procedure to display top five highest paid workers who are specialized in “PAINTING"
using table WORKER (workerid, name, wage_per_hour, specialized_in, manager_id)
Set 5
Create the database EXAM and create given tables with all necessary constraints such as primary key,
foreign key, unique key, not null and check constraints.
APPLICANT (AID, ANAME, ADDR, ABIRTH_DT)
ENTRANCE_TEST (ETID, ETNAME, MAX_SCORE, CUT_SCORE)
w.e.f. 2024-25 http://syllabus.gtu.ac.in/ Page 7 of 10
GUJARAT TECHNOLOGICAL UNIVERSITY
Program Name: Bachelor of Computer Applications
Level: Under Graduate
Course / Subject Code : BC02001021
Course / Subject Name : Database Management System
ETEST_CENTRE (ETCID, LOCATION, INCHARGE, CAPACITY)
ETEST_DETAILS (AID, ETID, ETCID, ETEST_DT, SCORE)
(This database is for a common entrance test which is being conducted at a number of centers and can
be taken by an applicant on any day except holidays)
Do as directed:
1. Modify the APPLICANT table so that every applicant id has an ‘A’ before its value. E.g. if value
is ‘1123’, it should become ‘A1123’.
2. Display test center details where no tests were conducted.
3. 3.Display details about applicants who have the same score as that of Ajaykumar in ‘ORACLE
FUNDAMENTALS’.
4. Display details of applicants who appeared for all tests.
5. Display those tests where no applicant has failed.
6. Display details of entrance test centers which had full attendance between 1st Oct 15 and 15th
Oct 16.
7. Display details of the applicants who scored more than the cut score in the tests they appeared
in.
8. Display average and maximum score test wise of tests conducted at Mumbai.
9. Display the number of applicants who have appeared for each test, test center wise.
10. Display details about test centers where no tests have been conducted.
11. For tests, which have been conducted between 2-3-17 and 23-4-17, show details of the tests as
well as the test centre.
12. How many applicants appeared in the ‘ORACLE FUNDAMENTALS’ test at Chennai in the
month of February?
13. Display details about applicants who appeared for tests in the same month as the month in which
they were born.
14. Display the details about APPLICANTS who have scored the highest in each test, test centre
wise.
15. Design a read only view, which has details about applicants and the tests that he has appeared
for.
16. Write a procedure which will print maximum score centre wise.
17. Write a procedure which will print details of entrance test showing Centre name, candidate id,
date, and score:
18. Write a trigger which do not allow insertion / updation / deletion of Enterance test details on
Sunday.
Set 6
EMP (empno, empnm, empadd, salary, date_birth, joindt, deptno)
DEPT (deptno, deptnm)
Write a PL/SQL block (table above EMP-DEPT table) which takes as input Department name and
w.e.f. 2024-25 http://syllabus.gtu.ac.in/ Page 8 of 10
GUJARAT TECHNOLOGICAL UNIVERSITY
Program Name: Bachelor of Computer Applications
Level: Under Graduate
Course / Subject Code : BC02001021
Course / Subject Name : Database Management System
displays all the employees of this department who has been working since last five years
Set 7
CUSTOMER (cid, fname, lname, city, country, phone)
ORDER (oid, oDate, oNumber, cid, oTotalAmount)
1. List the number of customers in each country. Only include countries with more than 100
customers.
2. List the number of customers in each country, except China, sorted high to low. Only include
countries with 5 or more customers.
3. List all customers with average orders between Rs.5000 and Rs.6500.
4. Create a trigger that executes whenever country is updated in CUSTOMER table.
5. Create a function to return customer with maximum orders.
6. Create a procedure to display month names of dates of ORDER table. The month names should be
unique.
Set 8
EMPMAST (empno, name, pfno, empbasic, deptno, designation)
DEPT (DNO, DNAME)
Rules: HRA = 15% of basic
DA = 50% of basic
Medical = 100
PF = 8.33%of basic
Print Salary slip. Design your own format
Learning Resources Required: If Any
1) https://onlinecourses.nptel.ac.in/noc24_cs21/preview
2) https://docs.oracle.com/en/database/index.html
3) https://docs.oracle.com/database/121/SQLRF/toc.htm
4) https://dev.mysql.com
5) https://docs.mongodb.com/manual/mongo/
Additional Exercises: If Any
NoSQL Database (Desirable)
Tools: MongoDB
1 Introduction, Installation
2 Create Database, Drop Database
3 Create Collection, show collection
w.e.f. 2024-25 http://syllabus.gtu.ac.in/ Page 9 of 10
GUJARAT TECHNOLOGICAL UNIVERSITY
Program Name: Bachelor of Computer Applications
Level: Under Graduate
Course / Subject Code : BC02001021
Course / Subject Name : Database Management System
4 Insert document, Query Document, Update document, delete document
5 Projection
6 Limiting rows
7 Export and Import
https://docs.mongodb.com/manual/mongo/
CO- PO Mapping:
Semester 2 Subject Name: Database Management System
POs
Course PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11
Outcomes
CO1 3 - - - - - - - - - -
CO2 2 3 2 - 2 - - - - - -
CO3 3 3 3 - 3 - - - - - -
CO4 3 2 3 - 3 - - - - - -
CO5 3 2 2 - 2 3 - - - - -
Legend: ‘3’ for high, ‘2’ for medium, ‘1’ for low and ‘-’ for no correlation of each CO with PO.
*******
w.e.f. 2024-25 http://syllabus.gtu.ac.in/ Page 10 of 10