Question: Again, using the Hotel schema, draw a relational algebra tree for each of the following queries and use the heuristic rules given in Section 23.3.2

Again, using the Hotel schema, draw a relational algebra tree for each of the following queries and use the heuristic rules given in Section 23.3.2 to transform the queries into a more efficient form:
(a) SELECT r.roomNo, r.type, r.price
FROM Room r, Booking b, Hotel h
WHERE r.roomNo = b.roomNo AND b.hotelNo = h.hotelNo AND
h.hotelName = ‘Grosvenor Hotel’ AND r.price > 100;
(b) SELECT g.guestNo, g.guestName
FROM Room r, Hotel h, Booking b, Guest g
WHERE h.hotelNo = b.hotelNo AND g.guestNo = b.guestNo AND
h.hotelNo = r.hotelNo AND h.hotelName = ‘Grosvenor Hotel’ AND
dateFrom >= ‘1-Jan-04’ AND dateTo <= ‘31-Dec-04’;

Step by Step Solution

3.43 Rating (166 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a b Discuss each step and state any transformation ... View full answer

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

Document Format (1 attachment)

Word file Icon

672-CS-DB (1440).docx

120 KBs Word File

Students Have Also Explored These Related Databases Questions!