Consider the following relation schemas. The primary keys are underlined. All attributes are of type string...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Answer rating: 100% (QA)
a To find the names of hotels in Orlando with available room types and prices that have amenities li... View the full answer
Related Book For
Database management systems
ISBN: 978-0072465631
3rd edition
Authors: Raghu Ramakrishan, Johannes Gehrke, Scott Selikoff
Posted Date:
Students also viewed these databases questions
-
1) Investment X yields a payment of $8000 at the end of year 1, a payment of $8000 at the end of year 2, a payment of $8000 at the end of year 3, and a payment of $12000 at the end of year 4....
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Would embracing cultural beliefs, values, and the care delivery approaches within our medical organizations make the U.S. more or less competitive than other countries? Explain
-
A taxpayer had the following income: a.) Gain on sale of domestic stocks - P200,000............ b.) Gain on sale of foreign bonds - P100,000............ c.) Gain on sale of a commercial lot in...
-
Use logarithmic differentiation to find the derivative of the function. 35. y = (2x + 1)(x* - 3) 36. y = Vxe ( + 1) sin'x tan'x 37. y (x + 1) 38. y = V - 39. y-x 40. y = x/* 41. y =xanx 42. y = (sin...
-
Norah Jones' (famous for the songs "Come Away With Me" and "Don't Know Why") last national concert tour sold an average of 2/3 of the tickets available, with 1/3 of seats left empty at a typical...
-
Calculate the volatility and the current price of oil futures implied by the call 1600 August and the call 1700 August of Figure 19.8 by using the Black-Scholes formula with \(T=.25\). OIL CRUDE OIL...
-
The following information has been collected regarding Burton Dee Company: Free cash flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....
-
1 . Explain Engels Law 2. How can Engels law be used to explain the increase in demand for workers in the service industries?
-
A boy tosses a ball onto the roof of a house. For the launch conditions shown, determine the slant distance s to the point of impact. Also, determine the angle which the velocity of the ball makes...
-
Use the following information for questions 27 through 28. The following information for Cooper Enterprises is given below: December 31.2015 Assets and obligations $400,000 Plan assets (at fair...
-
In 2014, the UK Home Office suspended the licenses of 57 private colleges. They launched an investigation into the UK subsidiary of the global testing company Educational Testing Service (ETS). They...
-
What advice would you give someone who is actively seeking work in relation to their activities on social media? What should they avoid saying or doing? Should they consider tidying up their...
-
In 2003, Dinesh Thakur joined the Indian pharmaceutical company Ranbaxy. Thakur, who went on to become the companys director, uncovered fraudulent practices at the company in drug development,...
-
ChoicePoint is the largest company in the $4 billion background-checking industry. Is there anything ChoicePoint can do, as the industry leader, to be more sensitive and respectful to the privacy...
-
Form a small group with several class members and discuss the following scenario: The owner-manager of a small, four-person consulting firm works long hours on multiple projects and expects his three...
-
Last month deer population is 250. If the instantaneous growth rate (r) is 20% and the carrying capacity of the deer population is 1000, find the this month's change of deaths (consider time interval...
-
Which of the ocean zones shown would be home to each of the following organisms: lobster, coral, mussel, porpoise, and dragonfish? For those organisms you identify as living in the pelagic...
-
Consider a relation R with five attributes ABCDE. 1. For each of the following instances of R, state whether it violates (a) the FD BC D and (b) the MVD BC D: (a) { } (i.e., empty relation) (b)...
-
Which of the following plays an important role in representing information about the real world in a database? Explain briefly. 1. The data definition language. 2. The data manipulation language. 3....
-
Consider the two internal organizations for heap files (using lists of pages and a directory of pages) discussed in the text. 1. Describe them briefly and explain the trade-offs. Which organization...
-
True or False: The most commonly used measure of inflation is the relative change in the Consumer Price Index.
-
Mike's Veneer Shop owns a vacuum press that requires annual maintenance. Mike has a contract to cover the maintenance expenses for the next 5 years. The contract calls for an annual payment of \(\$...
-
What is the relationship between inflation and deflation? Give an example of deflation experienced in your everyday life.
Study smarter with the SolutionInn App