Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

CSE 311: Database Management System

Sample Fall 2021, Faculty – MKN1


Mid Term Exam Marks: 30

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) Find the number of employees that work at law firms employing lawyers with 4
names have 'Md'?

1
b) Find the Full outer join between Lawyers and Firms 4

a) Find the Doctor Name who see patients that are at least 25 years old 3

b) Find the patient name and doctor name where a patient is an old (not as first visit 4
and upto 1 year)

3. You are building a database system for a bank. The bank tells you that it needs to
keep track of employees and customers. Every employee and every customer has a
(unique) social security number, a name, and an address. Customers also have an
account ID, which employees do not have (unless the employee is also a customer).
Employees have a hire date, which customers do not have (unless the customer is
also an employee). Furthermore, different information is stored about each
employee type: tellers work a certain number of hours per week at a certain wage,
loan officer work for a salary and have no fixed location, and managers work for a
salary but have no fixed location.
a) From the above sincere identify the relation with their attributes 4

b) Define the schema based on your finding. Mention the constrain of the relation 4

4. A department store is developing a database system for supporting product


searching in its online shop. The sample product form below identifies some of the
relevant data.
The system must be able to find out if a product of interest and in a particular size
and color is available in the store’s inventory. Also, customers should be able to get
a description of the main material used in a product. This is a longer note that states
whether a material is natural or not, what it is made from, how it is supposed to be
washed and ironed, etc.
When the system finds a product sought, it should be able to match automatically
the select product with matching product – one or more (e.g., a white blouse can be
matched with both a white and a blue jacket). These matches are pre-programmed.
a) From the above sincere identify the relation with their attributes 3

b) Write down the different types of fundamental relational algebra operations. With 4
the above relation give show the composition of relational algebra operation.

You might also like