Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Consider the following relation schemas. The primary keys are underlined. All attributes are of type string if not indicated otherwise. Use multi-step and multi-line

Consider the following relation schemas. The primary keys are underlined. All attributes are of type string

Consider the following relation schemas. The primary keys are underlined. All attributes are of type string if not indicated otherwise. Use multi-step and multi-line queries to ease the formulation of queries. Use the rename operator p to give intermediate query results a name (some textbooks use the equivalent notation). Aggregate functions as you can find them defined in some textbooks are not allowed, neither in homework assignments nor in exams. Hotels (hID, name, location, phone, avgRating: integer) Rooms(rID, HID, type, price, availability: boolean) Bookings(blD, rID, hID, gID, startDate, endDate, totalCost: integer) Guests(gID, name, phone, address) Amenities (amenityID, name, description) Hotel Amenities (hID, amenityID) Hotel Reviews (hID, gID, rating: integer, review) (a) Find the names of hotels, their available room types, and prices. The hotels should be located in Orlando and should have amenities such as free breakfast and a pool (amenity name) available. (b) Find the names of guests who have made more than one booking at HotelA (unique name). (c) Find the names of guests who have made a booking with HotelA (unique name) but have not reviewed the hotel yet. (d) Find the reviews and ratings of HotelA (unique name) given by either GuestA or GuestB (unique names). (e) Find the names of hotels in Orlando with the highest average rating. Display the hotel names and ratings together. (f) Find the names of guests who have booked every hotel in Orlando.

Step by Step Solution

3.37 Rating (144 Votes )

There are 3 Steps involved in it

Step: 1

a To find the names of hotels in Orlando with available room types and prices that have amenities li... blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database management systems

Authors: Raghu Ramakrishan, Johannes Gehrke, Scott Selikoff

3rd edition

72465638, 978-0072465631

More Books

Students explore these related Databases questions

Question

=+d) Which car would you produce and why?

Answered: 3 weeks ago