Home / Expert Answers / Computer Science / given-the-following-relational-schema-hotel-hotelno-name-address-mgrstaffno-pa475

(Solved): Given the following relational schema Hotel (hotelNo, name, address, mgrStaffNo) ...



Given the following relational schema Hotel (hotelNo, name, address, mgrStaffNo) pk fk Room (roomNo, hotelNo, type, price) fk pk Booking (hotelNo, guestNo, roomNo dateFrom, dateTo) fk fk fk r.a. r.a. pk Guest (guestNo, name, address, gender) pk Staff (staffNo, fName, lName, gender, dob, salary, telNo, hotelNo) pk ak fk Note: • Room types are: Single (S), Double (D), and Family (F). • Use the variable currentDate to specify today's' date. Formulate the following queries using SQL: a) List the names and addresses of all guests living in London, alphabetically ordered by name. b) List details of all double or family rooms with price below £49.00 per night, in ascending order of price. c) List the total number of rooms in each hotel. d) What is the average price of a room in hotels located in Glasgow? e) List the price and type of all rooms at the Grosvenor Hotel. f) List all guests currently staying at the Grosvenor Hotel. g) For each hotel list hotel number and name and the total number of the members of staff (under an appropriate header) who work there. h) For each hotel list the hotel name and the name and gender of the members of staff who manages the hotel. i) JF27Nov2017 added: Write a SQL statement to list the hotel name and the name of the manager or manageress of the hotel for each hotel in Edinburgh, and then state the Relational Algebra operations implemented by your SQL statement by giving the correspondences between the clauses of your SQL statement and the implemented Relational Algebra operations.



We have an Answer from Expert

View Expert Answer

Expert Answer


We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe