Question: Please help wtih relational algebra: please don't copy paste any answer that you find in chegg. I have already checked the other answer but I
Please help wtih relational algebra: please don't copy paste any answer that you find in chegg. I have already checked the other answer but I want another input.
Thank you!
Model:
For this lab, you'll be using the following relational model to answer queries using relational algebra:
Hotel(hID, hName, city) primary key is hID Guest(gID, gName, gAddress) primary key is gID Room(hID, rNumber, price) primary key is (hID, rNumber). hID is a foreign key to Hotel relation Book(gID, hID, rNumber, StartDate, EndDate) primary key is all attributes! (hID, rNumber) is a foreign key to Room relation gID is a foreign key to Guest relation.
Queries:
- Select hotels with at least 1 room with price > $1000.
- Select hotels with at least 2 rooms with price > $1000.
- Select hotel names with at least 2 rooms with price > $1000.
- Select cities that have at least 2 hotels.
- Select guests who have reserved a room with price > $1000 (VIPs).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
