You are on page 1of 2

Set 1

1. A movie studio wishes to use a database to manage their files of movies, actors, directors,
producers etc. The following facts are relevant:
• Each actor has appeared in many movies.
• Each director has directed many movies.
• Each movie has had one director, one or two producers (joint) and one or more actors.
• Each actor, director producer may have several addresses, emails and telephone numbers.
• Each actor enacts various roles in different movies. He/she also has a rating that impacts his/her
selection in a movie.

a) Draw an ER diagram for the movie studio based on the preceding information and use
EER concepts in your diagram. [10]
b) Map the ER diagram into a relational model. [4]
c) State the assumptions you make. [1]

2. Consider the following relations.

• Cinema (cid, cname, city, owner_name)


• Film (fid, title, director_name, genre, budget, rating)
• showing (fid, cid)

a) Create the tables and enter at least 5 sets of records in each table created that will help in
retrieving data from your database. [5]
b) Write the following queries in SQL. No duplicates should be printed in any of the answers.
Output should display at least one record set.

Q.i. Select all the owners name whose city is Kolkata. [2.5]
Q.ii. Select all the Film names whose rating is high. [2.5]
Set 2

1. A post office has few postmen who go every day to distribute letters. Every morning the post
office receives a large number of registered letters. The post office intends to create a database to
keep a track of these letters. Ever letter has a sender, the origin post office, the destination post
office, a date of registration, date of arrival at destination post office, receiver and a status. Every
sender has a name and an address. Every receiver has a name and an address. Every postman has
a designated area where he delivers the letters. The area consists of a set of streets under the
jurisdiction of the post office. Every street has a set of buildings. Every building has a number and
may be a premise name. It may be housing more than one family.

a) Draw an ER diagram for the post office based on the preceding information and use
EER concepts in your diagram. [10]
b) Map the ER diagram into a relational model. [4]
c) State the assumptions you make. [1]

2. Consider the following relations.

• Salespeople (snum, sname, city, commission)


• Customers (cnum, cname, city, rating, snum)
• orders (onum, amt, odate, rdate, cnum, snum)

a) Create the tables and enter at least 5 sets of records in each table created that will help in
retrieving data from your database. [5]
b) Write the following queries in SQL. No duplicates should be printed in any of the answers.
Output should display at least one record set.
Q.i. Select all the Salespeople whose commission is greater than Rs. 100.
Q.ii. Select all the orders given by the customer whose num =001.

You might also like