Again, using the Hotel schema, draw a relational algebra tree for each of the following queries and
Question:
(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’;
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Database Systems A Practical Approach to Design Implementation and Management
ISBN: 978-0132943260
6th Edition Global
Authors: Thomas Connolly, Carolyn Begg
Question Posted: