SQL Queries

Swamped with your writing assignments? We'll take the academic weight off your shoulders. We complete all our papers from scratch. You can get a plagiarism report upon request just to confirm.


Order a Similar Paper Order a Different Paper

4.

[4 points]

The following tables form part of a database held in a relational DBMS:-

Hotel (hotelNo, hotelName, city)

Room (roomNo, hotelNo, type, price)

Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo)

Guest (guestNo, guestName, guestAddress)

where

Hotel contains hotel details and hotelNo is the primary key;

Room contains room details for each hotel and (roomNo, hotelNo) forms the primary key;

Booking contains details of the bookings and (hotelNo, guestNo, dateFrom) forms the primary key;

and

Guest contains guest details and guestNo is the primary key.

Compose an SQL that lists the rooms that are currently unoccupied at the Grosvenor Hotel.

_____________________________________________________________________________________

5.

[4 points]

The following tables form part of a database held in a relational DBMS:-

Hotel (hotelNo, hotelName, city)

Room (roomNo, hotelNo, type, price)

Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo)

Guest (guestNo, guestName, guestAddress)

where

Hotel contains hotel details and hotelNo is the primary key;

Room contains room details for each hotel and (roomNo, hotelNo) forms the primary key;

Booking contains details of the bookings and (hotelNo, guestNo, dateFrom) forms the primary key;

and

Guest contains guest details and guestNo is the primary key.

Compose an SQL that creates a view containing the hotel name and the names of the guests staying at the hotel.

Writerbay.net

We offer CUSTOM-WRITTEN, CONFIDENTIAL, ORIGINAL, and PRIVATE writing services. Kindly click on the ORDER NOW button to receive an A++ paper from our masters- and PhD writers.

Get a 10% discount on your order using the following coupon code SAVE10


Order a Similar Paper Order a Different Paper