booking_room_nights table

The booking_room_nights table in the Hotel Booking Database Schema schema has 4 columns, keyed by id, with 1 foreign key to booking_rooms.

The frozen price of one night. Summing these gives the room total, and it survives any later change to rate_calendar.

Columns (4)

Columns of the booking_room_nights table
ColumnTypeConstraintsDescription
iduuidprimary key
booking_room_iduuidnot null, references booking_rooms.id
stay_datedatenot null
rate_centsintegernot null

Indexes (2)

  • (booking_room_id, stay_date) unique
  • (stay_date)

Relationships