Starting from:

$30

DB - Assignment # 4 SOLVED

DB - Assignment # 4

(ONLY Google Classroom SUBMISSIONS ALLOWED) (NO EMAIL SUBMISSIONS) (NO DEADLINE
EXTENSIONS)
Question # 1: Using the Hotel relational database schema shown below, specify the following
queries using the relational operators discussed in the class.
Describe the relations that would be produced by the following relational algebra operations (Textual
meaning required):
a) hotelNo (price  50 (Room) )
b) Hotel.hotelNo = Room.hotelNo(Hotel  Room)
c) hotelName (Hotel ⊳⊲ Hotel.hotelNo = Room.hotelNo (price  50 (Room)) )
d) guestName, hotelNo (Booking ⊳⊲ Booking.guestNo = Guest.guestNoGuest) 
hotelNo (city = ’London’(Hotel))
Question # 2: Generate the relational algebra expressions for the following queries, using the schema
given above:
a. List all hotels
b. List all single rooms with a price below £20 per night.
c. List the names and cities of all guests.
d. List the price and type of all rooms at the Grosvenor Hotel.
e. List all guests currently staying at the Grosvenor Hotel.
f. List the details of all rooms at the Grosvenor Hotel, including the name of the guest staying in the
room, if the room is occupied.
g. List the guest details (guestNo, guestName, and guestAddress) of all guests staying at the Grosvenor
Hotel.
h. Using relational algebra, create a view of all rooms in the Grosvenor Hotel, excluding price details.
What would be the advantages of this view?

More products