Question: Create a simple database for a hotel with the following tables and put data into it . The more tables with correct structure you add

Create a simple database for a hotel with the following tables and put data into it. The more tables with correct structure you add - the greater mark you get. Additional points are given for correctness of a database created in PostgreSQL.
Add the following tables into the database:
1. guest. Each guest is automatically given a unique integer number starting from 1. Add 5 more attributes that can characterize a hotel guest;
2. building. The hotel has a large territory with several housings. Each building is assigned a name (e.g.1,2,3A,3B,...), location data (latitude and longitude). The number of rooms inside, number of floors and a description are also important pieces of information, that should be stored in the database;
3. room. Characteristics of apartments are square, number of beds, bath, maximum quantity of persons, floor, building;
4. reservation. Reservations made by guests. Each reservation is characterized by reservation period, duration of stay in days, guest and room. New reservations should be automatically given a unique numeric identifier. Board type is also written in the reservation (no, BB, HB).
Set necessary foreign keys.
Add 3 check constraints.
Write data in the tables:
Buildings 2 records
Rooms 3 records in the first and 2 in the second building
Guests 2 with one stay
Guests 2 with 2 stays

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!