DBMS (CST-227) Unit-1
DBMS (CST-227) Unit-1
UNIT-1
Institute/Department: AIT/CSE
Division: 3rd
Subject Name: DATABASE MANAGEMENT SYSTEM
Subject Code: CST-227
Assignment No.:1
Max. Marks: 12
Course Outcomes:
CO Title Level
Number
CO1 Understand the fundamentals of database systems, Design and draw ER Understand
diagram for the real life problems.
CO2 Design and querying database using SQL. Apply
Questions:
Sr. No. Question CO Number
1. Consider the following relational database and give an expression in CO2
relational algebra each of the following queries :
Employee (person-name, street, city)
Works (person name, company name, salary)
Company (Company name, city)
Managers (person name, manager-name)
a) Find the names of all employees who work for First Bank Corporation.
b) Find the names and cities of residences of all employees who work for
First Bank Corporation.
c) Find the names of all the employees who do not work for First Bank
Corporation.
d) Find names of all employees who earn more than $10000 per annum.
e) Find names of all employees who earn more than every employee of
Small Bank Corporation
2. Suppose (A, B) and (C, D) are two relation schemas. Let r1 and r2 be the CO1
corresponding relation instances. B is a foreign key that refers to C in r2.
If data in r1 and r2 satisfy referential integrity constraints the give the
output.
Assignment No.:2
Max. Marks: 12
Course Outcomes:
CO Title Level
Number
CO1 Understand the fundamentals of database systems, Design and draw ER Understand
diagram for the real life problems.
CO2 Design and querying database using SQL. Apply
Questions:
Sr. No. Question CO Number
1. Let R and S be two relations with the following schema R CO1
(P,Q,R1,R2,R3) S (P,Q,S1,S2) Where {P, Q} is the key for both
schemas. Which of the following queries are equivalent?
Assignment No.:3
Max. Marks: 12
Course Outcomes:
CO Title Level
Number
CO1 Understand the fundamentals of database systems, Design and draw ER Understand
diagram for the real life problems.
CO2 Design and querying database using SQL. Apply
Questions:
Sr. No. Question CO Number
1. Suppose you are given the following requirements for a simple database CO2
for the National Hockey League (NHL):
the NHL has many teams,
each team has a name, a city, a coach, a captain, and a set of
players,
each player belongs to only one team,
each player has a name, a position (such as left wing or goalie),
a skill level, and a set of injury records,
a team captain is also a player,
a game is played between two teams (referred to as host team
and guest team) and has a date (such as May 11th, 2017) and a
score (such as 4 to 2).
Construct a clean and concise ER diagram for the NHL database.
1 ABC Chandigarh
2 DEF Ludhiana
3 GHI Mohali
4 GHI Mohali
If only the last row is to be deleted, write the query for the same.
Assignment No.:4
Max. Marks: 12
Course Outcomes:
CO Title Level
Number
CO1 Understand the fundamentals of database systems, Design and draw ER Understand
diagram for the real life problems.
CO2 Design and querying database using SQL. Apply
Questions:
Sr. No. Question CO Number
1. CO1
Assignment No.:5
Max. Marks: 12
Course Outcomes:
CO Title Level
Number
CO1 Understand the fundamentals of database systems, Design and draw ER Understand
diagram for the real life problems.
CO2 Design and querying database using SQL. Apply
Questions:
Sr. No. Question CO Number
1. Write the query that the itemdesc, itemrate, quantity on hand, and total price CO2
(qty_hd * itemrate) for each individual inventory item. Format each
inventory item return values as follows:
Description:--This is the item description
Price: -- This is the itemrate
QOH:--This is the quantity on hand
Value:--This is qty_hd multiplied by itemrate
Assignment No.:6
Max. Marks: 12
Course Outcomes:
CO Title Level
Number
CO1 Understand the fundamentals of database systems, Design and draw ER Understand
diagram for the real life problems.
CO2 Design and querying database using SQL. Apply
Questions:
Sr. No. Question CO Number
1. Student(rollNo, name, degree, year, sex, deptNo, CO2
advisor)department(deptId, name, hod, phone)Obtain the rollNo, name of
all girl students in the Maths Dept (deptId= 2)
2. You have been given a set of tables with data and asked to create a new CO2
database to store them. When you examine the data values in the tables,
what are you looking for?
Assignment No.:7
Max. Marks: 12
Course Outcomes:
CO Title Level
Number
CO1 Understand the fundamentals of database systems, Design and draw ER Understand
diagram for the real life problems.
CO2 Design and querying database using SQL. Apply
Questions:
Sr. No. Question CO Number
1. Student(rollNo, name, degree, year, sex, deptNo, CO1
advisor)department(deptId, name, hod, phone)Obtain the rollNo, name of
all girl students in the Maths Dept (deptId= 2)
DBMS (CST-227)
UNIT 2
Institute/Department: AIT-CSE
Division: 3rd Sem
Subject Name: Database Management System
Subject Code: CST-227
Questions:
Sr. No. Question CO Number
1. Write a PL/SQL block to ask the user to enter the student’s marks CO2
and determine the GRADE according to the following criteria.
>90 A
>80 AND <90 B
>70 AND <80 C
>60 AND <70 D
<60 F
Course Outcomes:
CO Title Level
Number
CO1 Understand the fundamentals of database systems, Design and draw ER Understand
diagram for the real life problems.
CO2 Design and querying database using SQL. Apply
Questions:
Sr. Question CO Number
No.
1. 1. Normalize the following Table:
CO2
2. Use LOOP to find and display 2 employees who are born on a Tuesday. Display CO2
only their full names. Raise and display a user-defined exception if the criterion
is not met.
3. Write a PL/SQL program that uses an explicit cursor to display the item and the CO2
inventory information for each product. The cursor will also calculate the values
for each inventory item (qty_hd * itemrate), and the total value of all inventory
items for that product category.
Create an explicit cursor that returns and then displays the itemdesc, itemrate,
quantity on hand, and total price (qty_hd * itemrate) for each individual inventory
item. Format each inventory item return values as follows:
Description:--This is the item description
Price: -- This is the itemrate
QOH:--This is the quantity on hand
Value:--This is qty_hd multiplied by itemrate
Create a variable that sums up the total value of all inventory items and then
display the total value after all rows are processed.
Assignment No.:2.3
Max. Marks: 12
Date of Allotment: 27/08/2019
Last date of Submission: 23/09/2019
Course Outcomes:
CO Title Level
Number
CO1 Understand the fundamentals of database systems, Design and draw ER Understand
diagram for the real life problems.
CO2 Design and querying database using SQL. Apply
Assignment No.:2.4
Max. Marks: 12
Course Outcomes:
CO Title Level
Number
CO1 Understand the fundamentals of database systems, Design and draw ER Understand
diagram for the real life problems.
CO2 Design and querying database using SQL. Apply
Questions:
Sr. No. Question CO Number
1. Write a program to find whether the assigned year is a ―Century and leap CO2
year‖ or ―Century and not leap‖ or ―Not century not leap‖ or ―Not century
but leap year‖.
2. Write a PL/SQL block to ask the user to enter the student’s marks CO2
and determine the GRADE according to the following criteria.
>90 A
>80 AND <90 B
>70 AND <80 C
>60 AND <70 D
<60 F
Assignment No.:2.5
Max. Marks: 12
Course Outcomes:
CO Title Level
Number
CO1 Understand the fundamentals of database systems, Design and draw ER Understand
diagram for the real life problems.
CO2 Design and querying database using SQL. Apply
Questions:
Sr. No. Question CO Number
1. Create an explicit cursor that returns and then displays the itemdesc, CO2
itemrate, quantity on hand, and total price (qty_hd * itemrate) for each
individual inventory item. Format each inventory item return values as
follows:
Description:--This is the item description
Price: -- This is the itemrate
QOH:--This is the quantity on hand
Value:--This is qty_hd multiplied by itemrate
2. Write a PL/SQL program that uses an explicit cursor to display the item CO2
and the inventory information for each product. The cursor will also
calculate the values for each inventory item (qty_hd * itemrate), and the
total value of all inventory items for that product category.
Course Outcomes:
CO Title Level
Number
CO1 Understand the fundamentals of database systems, Design and draw ER Understand
diagram for the real life problems.
CO2 Design and querying database using SQL. Apply
CO3 Analyze and apply concepts of normalization to relational database Understand
design
CO4 Understand the concept of transaction, concurrency and recovery. Remember
Questions:
Sr. No. Question CO Number
1. Create an explicit cursor that returns and then displays the itemdesc, CO2
itemrate, quantity on hand, and total price (qty_hd * itemrate) for each
individual inventory item. Format each inventory item return values as
follows:
Description:--This is the item description
Price: -- This is the itemrate
QOH:--This is the quantity on hand
Value:--This is qty_hd multiplied by itemrate
2. Write a PL/SQL program that uses an explicit cursor to display the item CO2
and the inventory information for each product. The cursor will also
calculate the values for each inventory item (qty_hd * itemrate), and the
total value of all inventory items for that product category.
Assignment No.:2.7
Max. Marks: 12
Course Outcomes:
CO Title Level
Number
CO1 Understand the fundamentals of database systems, Design and draw ER Understand
diagram for the real life problems.
CO2 Design and querying database using SQL. Apply
Questions:
Sr. No. Question CO Number
1. Write a program to find whether the assigned year is a ―Century and leap CO2
year‖ or ―Century and not leap‖ or ―Not century not leap‖ or ―Not century
but leap year‖.
DBMS (CST-227)
UNIT -3
Institute/Department- UIE-CSE
Division: 3rd Sem
Subject Name: Database Management System
Subject Code: CST-227
Course Outcomes:
CO Title Level
Number
CO1 Understand the fundamentals of database systems, Design and draw ER Understand
diagram for the real life problems.
CO2 Design and querying database using SQL. Apply
Questions:
Sr. No. Question CO Number
1. CO3
Consider the following schedule for transactions T1, T2 and T3:
Which one of the schedules below is the correct serialization of the
above?
Assignment No.:3.2
Max. Marks: 12
Course Outcomes:
CO Title Level
Number
CO1 Understand the fundamentals of database systems, Design and draw ER Understand
diagram for the real life problems.
CO2 Design and querying database using SQL. Apply
Questions:
Sr. No. Question CO Number
1. Write about Concurrency Algorithm? CO3
Assignment No.:3.3
Max. Marks: 12
Course Outcomes:
CO Title Level
Number
CO1 Understand the fundamentals of database systems, Design and draw ER Understand
diagram for the real life problems.
CO2 Design and querying database using SQL. Apply
Assignment No.:3.4
Max. Marks: 12
Course Outcomes:
CO Title Level
Number
CO1 Understand the fundamentals of database systems, Design and draw ER Understand
diagram for the real life problems.
CO2 Design and querying database using SQL. Apply
Assignment No.:3.5
Max. Marks:12
Course Outcomes:
CO Title Level
Number
CO1 Understand the fundamentals of database systems, Design and draw ER Understand
diagram for the real life problems.
CO2 Design and querying database using SQL. Apply
Assignment No.:3.6
Max. Marks: 12
Course Outcomes:
CO Title Level
Number
CO1 Understand the fundamentals of database systems, Design and draw ER Understand
diagram for the real life problems.
CO2 Design and querying database using SQL. Apply
Questions:
Sr. No. Question CO Number
1. IF the system recovers from a crash, it constructs an undo-list and a CO3
redo-list. Explain why log records for transactions on the undo-list
must be processed in reverse order while those log records for
transactions on the redo-list are processed in a forward direction.
Assignment No.:3.7
Max. Marks: 12
Course Outcomes:
CO Title Level
Number
CO1 Understand the fundamentals of database systems, Design and draw ER Understand
diagram for the real life problems.
CO2 Design and querying database using SQL. Apply
CO3 Analyze and apply concepts of normalization to relational database design Understand
CO4 Understand the concept of transaction, concurrency and recovery. Remember
Questions:
Sr. Question CO
No Numb
. er
1. Check whether Schedule is serial, serializable, Conflict serializable CO3
S:R2(Z),R2(Y),W2(Y),R3(Y),R3(Z),R1(X),W1(X),W3(Y)W3(Z)R2(X)R1(Y)W
1(Y)
2. State the purpose of the checkpoint mechanism. How often should checkpoints be CO3
performed? How does the frequency of checkpoints affect.
a. System performance when no failure occurs
b. The time it takes to recover from a system crash
c. The time it takes to recover from a disk crash
S:R2(Z),R2(Y),W2(Y),R3(Y),R3(Z),R1(X),W1(X),W3(Y)W3(Z)R2(X)R
1(Y)W1(Y)