Test 1 version 2 part a

29 views2 pages
Part D [5 points]
The following schemas describe relations in the sample database in CS:I.
A) Movie (MovieId:key, Title, Genre, Rating)
B) Customer (CustomerId:key, Name, Address, CreditCardNumber)
C) Rents (CustomerId, MovieId, DateRented, DateDue)
D) NEW SELECT from MOVIE where RATING = “PG”
E) PGmovies PROJECT MovieId, Title from NEW
F) TEMP1 JOIN CUSTOMER and RENTS
where CUSTOMER.CustomerId = RENTS.CustomerId
G) RENTALS PROJECT Name, Address, MovieId from TEMP1
H) PGrenters JOIN RENTALS and PGmovies
where RENTALS.MovieId = PGmovies.MovieId
For each relation below, select its schema from the list above.
_____A
MovieId Title Genre Rating
101 Sixth Sense, The thriller, horror PG-13
102 Back to the Future comedy adventure PG
1033 Monsters, Inc. animation, comedy G
104 Field of Dreams fantasy drama PG
105 Alien sci-fi horror
107 X-Men action, sci-fi PG-13
...
7442 Platoon action drama war R
_____C
CustomerId MovieId DateRented DateDue
101 102 08/11/2010 15/11/2010
103 104 07/11/2010 10/11/2010
105 1033 04/11/2010 13/11/2010
102 101 09/11/2010 11/11/2010
101 104 04/11/2010 14/11/2010
104 107 05/11/2010 10/11/2010
103 102 05/11/2010 11/11/2010
107 7442 06/11/2010 13/11/2010
dbSchemas2
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in

Get OneClass Grade+

Unlimited access to all notes and study guides.

YearlyMost Popular
75% OFF
$9.98/m
Monthly
$39.98/m
Single doc
$39.98

or

You will be charged $119.76 upfront and auto renewed at the end of each cycle. You may cancel anytime under Payment Settings. For more information, see our Terms and Privacy.
Payments are encrypted using 256-bit SSL. Powered by Stripe.