Hotel Booking Database Schema database schema
The Hotel Booking Database Schema database schema by Colton Bristow has 16 tables (properties, amenities, room_types, room_type_amenities and 12 more), 134 columns and 23 relationships, documented column by column.
- Tables
- 16
- Columns
- 134
- Relationships
- 23
- Enums
- 13
Tables (16)
| Table | Columns | Description |
|---|---|---|
| properties | 16 | timezone matters more than it looks. A stay date is a local calendar date, not a UTC instant. |
| amenities | 4 | Shared vocabulary so that wifi means the same filter across every property. |
| room_types | 11 | The sellable unit. Everything a guest shops for and books happens at this level. |
| room_type_amenities | 2 | |
| rooms | 6 | A physical door. Rooms are assigned at check-in, which is why bookings point at a room type and only later at a room. |
| rate_plans | 10 | Non-refundable at a lower price is a rate plan, not a discount. It carries its own cancellation policy. |
| cancellation_policies | 6 | penalty_value is a percentage for percentage type, otherwise minor units, otherwise a night count. |
| rate_calendar | 8 | One row per sellable night. This single table answers both what is free and what it costs, which is why availability search stays fast. |
| guests | 9 | The person who books is not always the person who sleeps there. See booking_guests. |
| booking_guests | 3 | Who actually occupies the room, which many jurisdictions require a hotel to record. |
| bookings | 17 | Dates are local calendar dates. Totals are snapshotted at booking time and rolled up from booking_room_nights. |
| booking_rooms | 9 | One row per room booked, so a family taking two rooms is one booking. assigned_room_id stays null until check-in. |
| booking_room_nights | 4 | The frozen price of one night. Summing these gives the room total, and it survives any later change to rate_calendar. |
| payments | 9 | Deposits, balances and refunds are all rows here, separated by type. Never net them into one figure. |
| housekeeping_tasks | 8 | A room is not sellable again until its departure clean is completed. That is the link between operations and inventory. |
| reviews | 12 | Unique on booking_id, so only a real completed stay can leave a review. That is the whole anti-fake-review mechanism. |
Enums (13)
- amenity_category
- room, bathroom, property, accessibility, entertainment
- bed_type
- single, double, queen, king, twin, bunk, sofa_bed
- room_status
- available, occupied, cleaning, maintenance, out_of_order
- meal_plan
- room_only, breakfast, half_board, full_board, all_inclusive
- penalty_type
- none, percentage, fixed_amount, first_night
- booking_status
- pending, confirmed, checked_in, checked_out, cancelled, no_show
- booking_channel
- direct, ota, phone, walk_in, corporate
- payment_type
- deposit, balance, incidental, refund
- payment_status
- pending, authorized, captured, failed, refunded
- payment_method
- card, cash, bank_transfer, voucher, ota_collect
- housekeeping_type
- daily_clean, departure_clean, deep_clean, maintenance
- housekeeping_status
- pending, in_progress, completed, blocked
- review_status
- pending, published, rejected
Document your own schema
This page is published from DB Planner, a collaborative ER diagram tool. Write the schema in the DBML editor or import it from SQL, then publish docs like these from the project's sharing settings.