Describe the relations that would be produced by the following relational algebra operations:

a) ?hotelNo (?price ? 50 (Room) )
b) ?Hotel.hotelNo ? Room.hotelNo(Hotel ? Room)
c) ?hotelName (Hotel Hotel.hotelNo ? Room.hotelNo (?price ? 50 (Room)) )
d) Guest (?dateTo ? ‘1-Jan-2007’ (Booking))
e) Hotel Hotel.hotelNo ? Room.hotelNo (?price ? 50 (Room)) )
f) ?guestName, hotelNo (Booking Booking.guestNo ? Guest.guestNo Guest) ?

A. This will produce a relation with a single attribute (hotelNo) giving the number of those
hotels with a room price greater than £50.
B. This will produce a join of the Hotel and Room relations containing all the attributes of
both Hotel and Room (there will be two copies of the hotelNo attribute). Essentially this
will produce a relation containing all rooms at all hotels.
D. This will produce a (left outer) join of Guest and those tuples of Booking with an end date
(dateTo) greater than or equal to 1-Jan-2007. All guests who don’t have a booking with
such a date will still be included in the join. Essentially this will produce a relation
containing all guests and show the details of any bookings they have beyond 1-Jan-2002.
E. This will produce a (semi) join of Hotel and those tuples of Room with a price greater
than £50. Only those Hotel attributes will be listed. Essentially this will produce a relation
containing all the details of all hotels with a room price above £50.
F. This will produce a relation containing the names of all guests who have booked all hotels in London.

Computer Science & Information Technology

You might also like to view...

To select a specific area of a worksheet to print, you should first use the _____ button.

A. Select Area B. Worksheet Area C. Print Area D. Area

Computer Science & Information Technology

Code for animation and other tasks that has been premade and is available for use in Flash is called which of the following?

A. Frame Rates B. Cel Animations C. Library Code D. Code Snippets

Computer Science & Information Technology