Subqueries or Joins
Week3 Discussion1 – Subqueries or Joins?
11 unread reply.33 replies.
Week3 Discussion1 – Subqueries or Joins?
The following tables form part of a database held in a relational DBMS:-
Hotel (hotelNo, hotelName, city)
Room (roomNo, hotelNo, type, price)
Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo)
Guest (guestNo, guestName, guestAddress)
where
Hotel contains hotel details and hotelNo is the primary key;
Room contains room details for each hotel and (roomNo, hotelNo) forms the primary key;
Booking contains details of the bookings and (hotelNo, guestNo, dateFrom) forms the primary key;
and
Guest contains guest details and guestNo is the primary key.
Compose an SQL query to list all guests currently staying at the Grosvenor Hotel. Explain your answer.
Answer these questions providing support for your answers, comment on the responses of others, and reflect on your experience and what you learned.
"Looking for a Similar Assignment? Order now and Get 10% Discount! Use Code "GET10" in your order"

