rooms table
The rooms table in the Hotel Booking Database Schema schema has 6 columns, keyed by id, with 1 foreign key to room_types. 2 columns in booking_rooms and housekeeping_tasks reference it.
A physical door. Rooms are assigned at check-in, which is why bookings point at a room type and only later at a room.
Columns (6)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| room_type_id | uuid | not null, references room_types.id | |
| room_number | varchar(20) | not null | |
| floor | smallint | ||
| status | room_status | not null | |
| notes | varchar(255) |
Indexes (2)
(room_type_id, room_number)unique(status)
Relationships
rooms.room_type_idreferencesroom_types.idbooking_rooms.assigned_room_idreferencesroomshousekeeping_tasks.room_idreferencesrooms