Question: Consider a relational database about hotels, customers (guests) and their bookings that is maintained by an online hotel booking company. The database consisting of the

Consider a relational database about hotels, customers (guests) and their bookings that is maintained by an online hotel booking company. The database consisting of the following tables(where the primary keys are underlined):

Hotel (hId, hName, hAddress, hCity) Guest( gId, gName, gAddress, gCity) Room( hid, roomNo, type, price ) Booking(gId, hId, roomNo, fromDate, year, noOfDays ) Where, hId and gId are identifiers for the hotels and the guests, and the Booking relation indicated that a guest booked a hotel room for a specified number of days (noOfDays) starting from fromDate of a given year.

Write a Tuple Relational Calculus (TRC) query that finds the ids and names of the hotels for which every one of our guests had made a booking during the year 2020.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!