You are on page 1of 2

ABV- Indian Institute of Information Technology & Management, Gwalior

Major (2020-2021) | Odd Semester


Course Title: Database Management Systems (DBMS) | Code: ITIT-2104/IMIT-2104
MM: 30 Duration: 70 Minutes
1. Please follow all the Instructions given on the cover page of the answer book.
2. All parts of a question should be answered consecutively.
3. The division of marks for each question is indicated at the end of the question.
4. All the answers should be written in a concise and precise manner. Use bullet points while writing answers.

Q.1 You are given the following schemas:

Actor (actorId, name, nationality, age)

Film (filmId, title, year, directorId)

Performance (actorId, filmId, character)

Director (directorId, name, nationality)

For each of the following questions, formulate the specified queries in relational algebra. DO NOT
use the Cartesian product operator in any of these expressions. Also, explain the logic behind your
solutions in brief (your answers would not be evaluated if you have not mentioned the logic).

a) Retrieve the name of each actor together with the titles of the films he/she has performed in.
b) Find out the names of all actors that have played the character of ‘Bruce Wayne’.
c) Retrieve the details of all actors that appeared in ‘Inception’.
[3 X 2 = 6 Marks]

Q.2 Let R = (A,B,C), and let 𝑟1 and 𝑟2 both be relations on schema R. Give an expression in SQL that is
equivalent to each of the following queries.
a) 𝑟1 ⋃ 𝑟2
b) 𝑟1 ⋂ 𝑟2
c) 𝑟1 − 𝑟2
d) 𝛱𝐴,𝐶 (𝑟1 ) ⋈ 𝛱𝐴,𝐶 (𝑟2)
[4 Marks]

Q. 3 Consider the following set of schemas for a car insurance company.

Person (driver-id, name, address)


Car (license, year,model)
Accident (report-number, date, location)
Suppose that customers own one or more cars, and each car has associated with it zero to any
number of recorded accidents (with a certain ‘damage_amount’). Draw the corresponding ER
Diagram for this insurance company and also explain it.
[5 Marks]

Q. 4 The following relation schema can be used to register information on the repayments on loans.

Repayment (borrower_id, name, address, loanamount, requestdate, repayment_date, repayment_amount)

A borrower is identified with a 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.
a) Derive the set of functional dependencies (from the given information).
b) State a candidate key for Repayment.
c) Make the schema normalization up to BCNF. Show all the intermediate steps.
[3+2+5 = 10 Marks]

Q. 5 Explain whether the following schedule S is:


a) conflict serializable
b) recoverable.
You should show all the intermediate steps.
[3+2 = 5 Marks]

***End of Question Paper***


***Best of Luck***

You might also like