You are on page 1of 2

CSE 311: Database Management System

SEC-10 Fall 2021, Faculty – MKN1


Mid Term Exam Marks: 40

Please read the instructions before you proceed:

 Submit both handwritten answer script


 Do not use any unfair means. If you cheat in any form your examination will
be cancelled.
 You must submit the assessment within the allowed timeframe
 However, plagiarism is strictly prohibited. Don't copy from some others.
 If anyone cheats in this exam, he or she may be marked as zero.

Submission guidelines:
After you complete the assignment rename it with your ID and Name and
upload ID_Name.pdf on Engrade in the turn-in section.

1. a) Describe the role of Database Administrator in DBMS. 5

c) “All super keys are candidate keys, but all candidate keys are not super keys”-justify your 5
answer.

2. Consider the following relational schema: 10


Employee (emp_id, name, age)
Books (isbn, title, author, publisher)
Loan (emp_id, isbn, date)
Write the following queries in relational algebra-
i. Find the names of employees who have borrowed a book published by Hill.
ii. Find the names of employees who have borrowed all books published by Hill.

1
3. Assume the following table- 10
Degree (degcode, name, subject)
Candidate (seatno, degcode, name, semester, month, year, result)
Marks (seatno, degcode, semester, month, year, papcode, marks)
[degcode – degree code, name – name of the degree (Eg. BSc.), subject – subject of the course
(Eg. DBMS), papcode – paper code (Eg. CSE-3105)]
Solve the following queries using SQL;
Write a SELECT statement to display,
(i) The name, subject and number of candidates for all degrees in which there are less than 5
candidates.
(ii) The names of all the candidate who have got highest total marks in BSc. DBMS.

4. Consider a “Restaurant Menu Ordering System”, which will facilitate the food items ordering 10
and services within a restaurant. The entire restaurant scenario is detailed as follows.
The Customer is able to view the food items menu, call the waiter, place orders and obtain the
final bill through the computer kept in their table. The waiters through their wireless tablet PC
are able to initialize a table for customers, control the table functions to assist customers,
orders, send orders to food preparation staff (chef) and finalize the customer’s bill. The food
preparation staffs (Chefs), with their touch-display interface to the system, are able to view
orders sent to the kitchen by waiters. During preparation, they are able to let the waiter know
the status of each item, and can send notification when items are completed. The system should
have full accountability and logging facilities, and should support supervisor actions to account
for exceptional circumstances, such as a meal being refunded or walked out on.
i. From the above sincere identify the relation with their attributes

ii. Draw Schema diagram based on your finding relations.

iii. Define the schema based on your finding. Mention the constrain of the relation

You might also like