The ER diagram represents a Hotel Booking System, where customers can search for and book hotel rooms. The system includes multiple Hotels, each identified by a unique ID, name, and location. Every hotel contains Rooms, which have details such as type, price, and availability status. Customers can make Bookings, which link a specific customer to a hotel and room, along with details such as check-in and check-out dates. Each booking has an associated Payment, which records the amount, date, and payment method used. This ER diagram outlines the core components of a hotel reservation system, managing room availability, customer bookings, and payment processing efficiently.

Edit this diagram in Gleek
Hotel Booking System diagram code in Gleek
HotelBookingSystem
UniqueIdentifier hotelId PK "unique identifier for the hotel"
String hotelName "name of the hotel"
String hotelLocation "location of the hotel"
Room
UniqueIdentifier roomId PK "unique identifier for the room"
String roomType "type of the room"
Number roomPrice "price of the room"
String roomStatus "status of the room"
Customer
UniqueIdentifier customerId PK "unique identifier for the customer"
String customerName "name of the customer"
String customerEmail "email of the customer"
String customerPhone "phone number of the customer"
Booking
UniqueIdentifier bookingId PK "unique identifier for the booking"
UniqueIdentifier hotelId FK "reference to Hotel"
UniqueIdentifier roomId FK "reference to Room"
Date bookingDate "date of booking"
Date checkInDate "check-in date"
Date checkOutDate "check-out date"
String paymentStatus "status of the payment"
Payment
UniqueIdentifier paymentId PK "unique identifier for the payment"
UniqueIdentifier bookingId FK "reference to Booking"
UniqueIdentifier customerId FK "reference to Customer"
Number paymentAmount "amount of the payment"
Date paymentDate "date of the payment"
String paymentMethod "method of the payment"
HotelBookingSystem {1}-has-{1..n} Room
Room {1}-isIn-{1} HotelBookingSystem
Customer {1}-makes-{1..n} Booking
Booking {1}-isFor-{1} Room
Booking {1}-isAt-{1} HotelBookingSystem
Payment {1}-isFor-{1} Booking
Payment {1}-isMadeBy-{1} Customer
About ER diagrams
We often make an entity-relationship (ER) diagram, ERD, or entity-relationship model, in the early stages of designing a database. An ERD is perfect for quickly sketching out the elements needed in the system. The ERD explains how the elements interact. ER diagrams can be shared with colleagues. Their simplicity makes them ideal even for non-technical stakeholders.
Similar ER diagram examples
Online store entity-relationship diagram
Employee management system entity-relationship diagram
Banking system entity-relationship diagram
Travel management system Er diagram
College management system ER diagram