A MySQL-based hotel management system demonstrating relational database design, business logic implementation, and operational workflows for hotel management.
- 🏨 Relational database design
- 🗄️ Normalized MySQL schema
- ⚙️ Stored procedures
- 🔄 Business rule enforcement with triggers
- 📊 Reporting views
- 🧪 Demo scripts with sample data
This project implements a simplified hotel management database covering the core business operations of a hotel, including room reservations, payments, housekeeping, and maintenance requests.
The system demonstrates practical database engineering concepts such as relational modeling, stored procedures, triggers, views, constraints, and automated business logic using MySQL.
flowchart TD
CUSTOMER --> BOOKING
ROOM --> BOOKING
BOOKING --> PAYMENT
ROOM --> CLEANING_TASK
ROOM --> MAINTENANCE_REQUEST
STAFF --> CLEANING_TASK
- MySQL
- SQL
- MySQL Workbench
- Stored Procedures
- Triggers
- Views
| Module | Purpose |
|---|---|
| CUSTOMER | Guest information |
| ROOM | Room information and availability |
| BOOKING | Room reservations |
| PAYMENT | Booking payments |
| CLEANING_TASK | Housekeeping workflow |
| MAINTENANCE_REQUEST | Maintenance tickets |
| STAFF | Hotel staff information |
Hotel-Management-Database/
├── 00_schema.sql
├── 01_triggers.sql
├── 02_procedures.sql
├── 03_views.sql
├── 04_seed_data.sql
├── 05_test_demo_manual.sql
├── 06_test_demo_auto.sql
├── ERD_Diagram.png
├── Hotel_Booking.drawio.png
└── README.md
- Normalized relational database schema
- Primary and foreign key constraints
- Stored procedures for booking and checkout
- Trigger-based business rules
- Automated housekeeping workflow
- Reporting views
- Sample data
- Manual and automated demo scripts
Run the SQL scripts in the following order:
00_schema.sql01_triggers.sql02_procedures.sql03_views.sql04_seed_data.sql05_test_demo_manual.sqlor06_test_demo_auto.sql
The project is designed for MySQL Workbench but is compatible with standard MySQL installations.
Customer
│
▼
Create Booking
│
▼
Payment
│
▼
Check-out
│
▼
Cleaning Task Created
│
▼
Room Available
Recommended screenshots:
- ER Diagram
- Booking workflow
- Procedure execution
- Reporting views
- Trigger demonstration
- Procedure-based booking creation (
sp_create_booking) - Booking conflict prevention using triggers
- Automated housekeeping after checkout
- Revenue reporting using SQL views
- Maintenance request management
- One booking is limited to one room.
- Cleaning staff assignment is optional.
- No user authentication layer.
- Designed for educational purposes.
- Multi-room reservations
- Employee scheduling
- Inventory management
- Billing module
- Web interface
- REST API integration
- Role-based access control
To Minh Ly
