DataBase 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. Generate the relational algebra, expressions for the following queries: (a )List all hotel names. (b) List all single rooms with a price below £20 per night. (c) List the names and cities of all guests. (d) List the price and type of all rooms at the Grosvenor Hotel. (e) List all guests currently staying at the Grosvenor Hotel. (f) List the total number of rooms in each hotel.
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.
Generate the relational algebra, expressions for the following queries:
(a )List all hotel names.
(b) List all single rooms with a price below £20 per night.
(c) List the names and cities of all guests.
(d) List the price and type of all rooms at the Grosvenor Hotel.
(e) List all guests currently staying at the Grosvenor Hotel.
(f) List the total number of rooms in each hotel.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images