Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

introduction to database systems The following tables form pan of a database hel

ID: 669660 • Letter: I

Question

introduction to database systems The following tables form pan of a database held in a relational OHMS: Hotel (hotel No. hotelName. city) Room (roomNo. hotelNo. type, price) Hooking (hotelNo. guest No. dateFrom. dateTo. roomNo) Guest (guestNo. guest Name. guestAddress) where Hotel contains hotel details and hotel No is the primary key; Room contains room details for each hotel and (room No, hotel No) forms the primary key; Booking contains details of the bookings and (hotel No. guest No. date From) forms the primary key; and Guest contains guest details and guestNo is the primary key. Describe the relations that would be produced by the following relational algebra operations:

Explanation / Answer

a)

it will list the hotel number where room price > 50

b)

Room number of all the hotels with given hotel number. It will create a join of table Hotel and Room

c)

It will display hotel name of the hotel and will join hotel and room table.It will display the information only when price of the room > 50.

d)

It will display the guest details who has done bookings from current date to 1 jan 2002.

e)

It will display details of the hotel where room price > 50

f)

it will display guest name and hotel number of the hotel where hotel city is london.