Sample Final1
Sample Final1
Final Examination
• You are allowed to bring to the exam one sheet of paper HAND-WRITTEN on both sides (if
needed). On this sheet of paper you can write down what you think you will need for the exam.
• There is no question during the exam. If you are unsure, write down your assumptions
the actors appearing in the movie, and which local distributors are distributing the movie.
The database should keep track of each movie theater currently operational. Each theater is identified by
an ID but also its name and location. The manager of the theater and the number of screens (at least one) in
the theater are also recorded. For each movie showing in the theater, both its identifying information and the
local distributor providing the movie are recorded. Each theater may use several distributors, but only one
distributor provides any one movie. A movie house always has as many movies showing as it has screens. The
start date and end date of any movies showing in the theater are also recorded.
The database keeps information on movie reviews. For each review the following information is kept: the
movie reviewed, the reviewer, the date the review was written, the publisher of the review (e.g. NY Times,
PBS,MSNBC), and the text of the review. (Even if a review appears in several forms, e.g. Web,
newspaper, TV, it has only one publisher.)
The business name, proprietor, address and telephone number of each local distributor are recorded.
Local distributors are uniquely identified by their business names. The movies each distributor carries for
distribution are recorded. Information is kept on actors, specifically each actors name, mandatory Actors Equity
unique ID number, agent, and a scalar measure of the actors ability to draw viewers. An actor need not have
an agent, but cannot have more than one agent. Information is kept on agents who can represent actors,
specifically each agents name, mandatory unique taxpayer ID, address, telephone number and email
address.
1
1. Identify entity types and attributes
2. Identify relationships types and mapping cardinalities
3. List 10 functional dependencies
4. Present a complete ER diagram
5. Give a step by step mapping of the ER diagram to the relational model.
2
3 Logical Query Plan Transformation [15]
Consider the two relations R(A,B,C) and S(C,D,E). Consider the following relational algebra expression:
ΠA,B σS>C=5∧R.A=10∧R.C=S>C (R × S)