Consider the following relational database schema for an online hotel booking system. Hotel HotellD Name Phone...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the following relational database schema for an online hotel booking system. Hotel HotellD Name Phone Address City State Zip Point Of Interest POUD Name Description Room RoomID HotellD RoomNumber Rate Hotel TOPOI HotellD POID Reservation GuestID RoomID StartDate EndDate RoomToAmenity RoomID AmenityID Guest GuestID Name Email Amenity AmenityID Name Write appropriate SQL statements for the following. You should write a single query for each question: 1. Retrieve the name and address of all hotels which is close to the "Eifel Tower" point of interest 2. Retrieve the room number, total bill [rate* (enddate-startdate)] and guest name for all guests staying in "Radisson Blu" in "Dhaka" city. DATEDIFF(enddate, startdate) 3. Retrieve the name of all hotels and room numbers in Venice with the amenities king sized bed and private bathroom. The retrieved list should be sorted according to the rate. 4. List all amenities available in Seagull hotel. 5. List the room numbers with highest rate for each hotel in "Madrid" 6. Retrieve the room number with lowest rate. 7. Retrieve the name of all hotels in Chittagong that are close to more than 3 point of interests. Consider the following relational database schema for an online hotel booking system. Hotel HotellD Name Phone Address City State Zip Point Of Interest POUD Name Description Room RoomID HotellD RoomNumber Rate Hotel TOPOI HotellD POID Reservation GuestID RoomID StartDate EndDate RoomToAmenity RoomID AmenityID Guest GuestID Name Email Amenity AmenityID Name Write appropriate SQL statements for the following. You should write a single query for each question: 1. Retrieve the name and address of all hotels which is close to the "Eifel Tower" point of interest 2. Retrieve the room number, total bill [rate* (enddate-startdate)] and guest name for all guests staying in "Radisson Blu" in "Dhaka" city. DATEDIFF(enddate, startdate) 3. Retrieve the name of all hotels and room numbers in Venice with the amenities king sized bed and private bathroom. The retrieved list should be sorted according to the rate. 4. List all amenities available in Seagull hotel. 5. List the room numbers with highest rate for each hotel in "Madrid" 6. Retrieve the room number with lowest rate. 7. Retrieve the name of all hotels in Chittagong that are close to more than 3 point of interests.
Expert Answer:
Answer rating: 100% (QA)
Based on the relational database schema provided for the online hotel booking system here are the SQL statements to address the tasks presented 1 Retr... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
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...
-
Consider the following relational schema and SQL query. The schema captures information about employees, departments, and company finances (organized on a per department basis). Emp(eid: integer,...
-
The following selected financial information was obtained from the 2012 financial reports of Robotranics, Inc. and Technology, Limited: Assume that total assets, total liabilities, and total...
-
Butala Sales Company, which uses the perpetual inventory system and makes all credit sales with terms 1/10, n/30, had the following transactions during January. Butala records all sales returns and...
-
Fixed costs are conventionally deemed to be: (a) Constant per unit of output; (b) Constant in total when production volume changes; (c) Outside the control of management; (d) Those unaffected by...
-
Owing to a small federal grant from the Department of Housing and Urban Development (HUD) to the Town of Stillman, Nadine Gordimer, CPA has performed grant audits for the town in each of the past...
-
As you enter the door of Mermans, Annie Oaklea greets you warmly, saying, Im delighted with the work you have done on the data flow diagrams. I would like you to keep playing the role of systems...
-
Windy introduces a new compact music player that carries a two-year warranty against manufacturer's defects. Based on industry experience with similar product introductions, warranty costs are...
-
List the MNCs key stakeholders and describe their stake in the firm.
-
How many lines, as a function of n (in (n) form), do each of the following programs print? Please explain how you arrived at the answer. (a) In the following n div 2 is the quotient when n is divided...
-
Use your graphing calculator to find the value of f '(0) for f(x) = sin(x) + e*. 00 01 02 0-1
-
What is the derivative of f(x) = (2x + 1)2 e4r
-
Solve dx =
-
How to get the Net Income from 2021 in this example picture above/below? 3 Miscellaneous financial information Retained earnings 5 Noncontrolling interests 5 Other comprehensive income SG&A and other...
-
Hagelin Co. wants to issue new 18-year bonds for some much-needed expansion projects. The company currently has 9 percent coupon bonds on the market that sell for $1,045, make semiannual payments,...
-
A Cartesian equation for the parametric curve is given by O 12x+27y=1, 0 x 27 12x+27y=324, 0x 27 27x+12y=324, 0x 12 12x+27y=1, Os x 27 Ox+y 324, 0x 324 x=27sin0, y=12cos20, 0 3/2
-
Marc Company assembles products from a group of interconnecting parts. The company produces some of the parts and buys some from outside vendors. The vendor for Part X has just increased its price by...
-
Which of the following returns all books published after March 20, 2005? a. SELECT * FROM books WHERE pubdate > 03-20-2005; b. SELECT * FROM books WHERE pubdate > '03-20-2005'; c. SELECT * FROM books...
-
Which command can you use to change the existing data in a table?
-
Create a B-tree index on the customers Lastname column. Verify that the index exists by querying the data dictionary. Remove the index from the database.
-
Determine the required cross-sectional area of member BC if the allowable normal stress is allow = 24 ksi. 800 lb 400 lb 6 ft 6 ft B 60 6 ft 30 -45' D 6 ft
-
The hangers support the joist in such a way that the four nails on each hanger can be assumed to support an equal portion of the load. If the joist is subjected to the loading shown, determine the...
-
The hangers support the joist in such a way that the four nails on each hanger can be assumed to support an equal portion of the load. Determine the smallest diameter of the nails at A and B to the...
Study smarter with the SolutionInn App