Question: Using the Hotel schema given at the start of the Exercises at the end of Chapter 4, determine whether the following queries are semantically correct:

Using the Hotel schema given at the start of the Exercises at the end of Chapter 4, determine whether the following queries are semantically correct:
(a) SELECT r.type, r.price
FROM Room r, Hotel h
WHERE r.hotel_number = h.hotel_number AND
h.hotel_name = ‘Grosvenor Hotel’ AND
r.type > 100;
(b) SELECT g.guestNo, g.name
FROM Hotel h, Booking b, Guest g
WHERE h.hotelNo = b.hotelNo AND h.hName = ‘Grosvenor Hotel’;
(c) SELECT r.roomNo, h.hotelNo
FROM Hotel h, Booking b, Room r
WHERE h.hotelNo = b.hotelNo AND h.hotelNo = ‘H21’AND
b.roomNo = r.roomNo AND type = ‘S’ AND b.hotelNo = ‘H22’;

Step by Step Solution

3.27 Rating (171 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a Not semantically correct hotelnumber and hotelname are not the names of ... 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 (1439).docx

120 KBs Word File

Students Have Also Explored These Related Databases Questions!