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.

ER diagram of the Hotel Booking Database Schema schema, showing 16 tables and their relationships
FIG. 1: entity relationship diagram, 16 tables
Tables
16
Columns
134
Relationships
23
Enums
13

Tables (16)

Tables in the Hotel Booking Database Schema schema
TableColumnsDescription
properties16timezone matters more than it looks. A stay date is a local calendar date, not a UTC instant.
amenities4Shared vocabulary so that wifi means the same filter across every property.
room_types11The sellable unit. Everything a guest shops for and books happens at this level.
room_type_amenities2
rooms6A physical door. Rooms are assigned at check-in, which is why bookings point at a room type and only later at a room.
rate_plans10Non-refundable at a lower price is a rate plan, not a discount. It carries its own cancellation policy.
cancellation_policies6penalty_value is a percentage for percentage type, otherwise minor units, otherwise a night count.
rate_calendar8One row per sellable night. This single table answers both what is free and what it costs, which is why availability search stays fast.
guests9The person who books is not always the person who sleeps there. See booking_guests.
booking_guests3Who actually occupies the room, which many jurisdictions require a hotel to record.
bookings17Dates are local calendar dates. Totals are snapshotted at booking time and rolled up from booking_room_nights.
booking_rooms9One row per room booked, so a family taking two rooms is one booking. assigned_room_id stays null until check-in.
booking_room_nights4The frozen price of one night. Summing these gives the room total, and it survives any later change to rate_calendar.
payments9Deposits, balances and refunds are all rows here, separated by type. Never net them into one figure.
housekeeping_tasks8A room is not sellable again until its departure clean is completed. That is the link between operations and inventory.
reviews12Unique 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.

More published database schemas