Question: 1. Create the Room table with the following fields: Number, Type (Simple, Double, Suite), Roof (between 1 and 10), Number of bed (between 1 and

1. Create the Room table with the following fields: Number, Type (Simple, Double, Suite), Roof (between 1 and 10), Number of bed (between 1 and 4), Situation (Available, Occupied).

Fill in the Room table with the following authors:

Number Type Roof Number of Bed Situation
1 Simple 1 1 Available
2 Suite 1 4 Occupied
3 Simple 1 2 Available
4 Simple 1 2 Occupied
5 Simple 2 1 Occupied
6 Simple 2 2 Available
7 Double 2 1 Occupied
8 Suite 2 2 Available

2 Create the Client table with the following fields: ID, First Name, Last Name and Number of room.

Fill in the Client table with the following authors:

ID First Name Last Name Number of Room
A567890 Malki Aziz 2
B678544 Nafidi Ahmed 2
AB785666 Larzak Hind 5
BE45434 Alaoui Najib 7

3. Perform the following queries:

a. List the first and last names of the hotel's guests?

b. List the numbers of empty rooms and their number of beds?

c. Give the number and type of the room of Mr. Malki?

d. Give the numbers of the double rooms and their situations?

e. What are the numbers of the double rooms that have more than 2 beds?

f. Give the numbers of the rooms that have the maximum number of beds?

g. Give the names of the rooms and their guests? h. What are the names of the guests in room 2?

i. Give the number of beds in our hotel? j. How many beds are available in our hotel?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!