You are on page 1of 2

Reg. No.

:
Name :

Mid-Term Examinations, October 2021


Programme : B.Tech – AI&ML,BHI Semester : Fall 2021-22
Course : Database Management Systems Code : CSE3001
Faculty : Ms.E.Suganya Slot/Class no. : F11/F12/F13/ 0527
Time : 1½ hours Max. Marks : 50

Answer all the Questions

Sub
Q.No. . Question Description Marks
Sec.

1 Identify six differences between a file processing system and a Database


a Management System 5
Analyse the difference between two-tier and three tier architecture and
b identify which type of architecture is best suited for Web Applications 5

2 Suppose you are given the following requirements for a simple database for the
National Hockey League (NHL):
1. The NHL has many teams,
2. Each team has a name, a city, a coach, a captain, and a set of players,
3. Each player belongs to only one team,
4. Each player has a name, a position (such as left wing or goalie), a skill level,
10
and a set of injury records,
5. A team captain is also a player,
6. A game is played between two teams (referred to as host_team and
guest_team)and has a date (such as May 11th, 1999) and a score (such as 4 to
2).
Construct a clean and concise ER diagram for the NHL database.
3 A borrower is identified with an unique borrower_id, and has only one address.
Borrowers can have multiple simultaneous loans, but they always have different
request dates. The borrower can make multiple repayments on the same day, but
not more than one repayment per loan per day. 10
a) State a key (candidate key) for Repayment.
b) Make the normalization to BCNF. Show the steps.
4 Consider the following relational database:
employee(e-name, street, city)
works(e-name, c-name, salary)
company(c-name, city) 10
manages(e-name, m-name)
Write relational algebra expressions for the following queries.
a) Find the names and cities of residence of all employees who work for the First
Page 1 of 2
Bank Corporation.
b) Find the names, street address, and cities of all employees who work for First
Bank Corporation and earn more than $10,000 per annum. Assume each person
works for at most one company.
c) Find the names of all employees in this database who live in the same city as the
company for which they work.
d) Find the names of all employees who live in the same city and on the same
street as do their managers.
e) Find the names of all employees in this database who do not work for the First
Bank Corporation. Assume that all people work for exactly one company.
f) Find the name of all employees who earn more than every employee of Small
Bank Corporation. Assume that all people work for at most one company.
5 Consider the following relational database:
Worker (worker_id,first_name,last_name,salary,joining_date,department)
Bonus (worker_ref_id , bonus_date , bonus_amount)
Title (worker_ref_id,worker_title,affected_from)
Give an expression in SQL to express each of the following queries :
1. 1. Write an SQL query to fetch unique values of DEPARTMENT from
Worker table.
2. 2. Write an SQL query to print details for Workers with the first name as
“Vipul” and “Satish” from Worker table. 10
3. 3. Write an SQL query to fetch the no. of workers for each department in the
descending order.
4. 4. Write an SQL query to determine the second highest salary from worker.
5. 5. Write an SQL query to fetch the list of employees with the same salary.
6. 6. Write an SQL query to fetch the departments that have less than five people
in it.



Page 2 of 2

You might also like