

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
In the course of the database theory, we study the key concept regarding the database. The major points in these homework exercises are:Movie Database, Two Relations, Currently Playing Movies, Relational Calculus, Relational Algebra, Nr-Datalog, Division Binary Operator, Universal Quantification, Containing Tuples, Standard Algebra Operators
Typology: Exercises
1 / 2
This page cannot be seen from the preview
Don't miss anything!


CSE 233 Spring, 2012
Due on Tuesday , April 24
This is an individual assignment and the usual criteria for academic integrity apply. Please typeset your answer (latex recommended). More difficult problems are marked with ?.
movie: title, director, actor schedule: theater, title
The first relation provides titles, directors, and actors of various movies. Assume a movie is uniquely identified by its title. Do not assume that a movie has a unique director (so a movie by Hitchcock is one for which one of the directors is Hitchcock). The second relation provides the titles of currently playing movies and the theaters where they are being shown. Express the following queries in (i) relational calculus, (ii) relational algebra and (iii) nr-Datalog¬.
(a) List the theaters showing some movie by Hitchcock.
(b) List the theaters showing only movies by Hitchcock.
(i) Use ÷ (and standard algebra operators) to express the query “List the theaters showing every movie by Hitchcock”.
(ii) Show how P ÷Q can be expressed using the standard relational algebra operators (you can assume, for simplicity, that att(P ) = {A, B} and att(Q) = {B}).
Find the theaters showing more than one title
(i) Express this query in relational calculus and relational algebra.
(ii) (?) Prove that every relational algebra expression defining the above query must use the attribute renaming operator δ.