Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Please write answers as a relational algebra expression. Consider the following relation schemas. The primary keys are underlined. All attributes are of type string if

image text in transcribed

Please write answers as a relational algebra expression.

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 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. [Note: If the location of your answer for a question is not correctly specified in Gradescope, one point will be deducted.] - Hotels(hID, name, location, phone, avgRating: integer) - Rooms(rID, hID, type, price, availability: boolean) - Bookings(bID, rID, IID,gID, startDate, endDate, totalCost: integer) - Guests(gID, name, phone, address) - Amenities(amenityID, name, description) - HotelAmenities(hID, amenityID) - HotelReviews(hID, gID, rating: integer, review) (a) [5 points] 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) [5 points] Find the names of guests who have made more than one booking at HotelA (unique name). (c) [5 points] Find the names of guests who have made a booking with HotelA (unique name) but have not reviewed the hotel yet. (d) [5 points] Find the reviews and ratings of HotelA (unique name) given by either GuestA or GuestB (unique names). (e) [5 points] Find the names of hotels in Orlando with the highest average rating. Display the hotel names and ratings together. (f) [5 points] Find the names of guests who have booked every hotel in Orlando

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

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

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

Differentiate 3sin(9x+2x)

Answered: 1 week ago

Question

Compute the derivative f(x)=(x-a)(x-b)

Answered: 1 week ago