0% found this document useful (0 votes)
12 views

Hotel_Management_Database_Design_With_Tables

Uploaded by

xofag86299
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Hotel_Management_Database_Design_With_Tables

Uploaded by

xofag86299
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Hotel Management Database Design with Tables

Guests Table

Column Name Data Type Constraints

guest_id INT Primary Key, Auto Increment

first_name VARCHAR(50) NOT NULL

last_name VARCHAR(50) NOT NULL

email VARCHAR(100) UNIQUE, NOT NULL

phone_number VARCHAR(15) UNIQUE, NOT NULL

address TEXT NULL

Rooms Table

Column Name Data Type Constraints

room_id INT Primary Key, Auto Increment

room_number VARCHAR(10) UNIQUE, NOT NULL

room_type VARCHAR(20) NOT NULL

capacity INT NOT NULL

price_per_night DECIMAL(10, 2) NOT NULL

status ENUM('Available', 'Occupied',


Default:'Maintenance')
'Available'

Reservations Table

Column Name Data Type Constraints

reservation_id INT Primary Key, Auto Increment

guest_id INT Foreign Key -> Guests(guest_id)

room_id INT Foreign Key -> Rooms(room_id)

check_in_date DATE NOT NULL


check_out_date DATE NOT NULL

status ENUM('Confirmed', 'Cancelled',


Default: 'Confirmed'
'Completed')

Payments Table

Column Name Data Type Constraints

payment_id INT Primary Key, Auto Increment

reservation_id INT Foreign Key -> Reservations(reservation_id)

amount DECIMAL(10, 2) NOT NULL

payment_date DATE NOT NULL

payment_method ENUM('Credit Card', 'Debit


NOTCard',
NULL'Cash', 'Online')

status ENUM('Paid', 'Pending',Default:


'Failed')'Pending'

Services Table

Column Name Data Type Constraints

service_id INT Primary Key, Auto Increment

service_name VARCHAR(50) UNIQUE, NOT NULL

description TEXT NULL

price DECIMAL(10, 2) NOT NULL

Guest Services Table

Column Name Data Type Constraints

guest_service_id INT Primary Key, Auto Increment

reservation_id INT Foreign Key -> Reservations(reservation_id)

service_id INT Foreign Key -> Services(service_id)

quantity INT NOT NULL

total_price DECIMAL(10, 2) NOT NULL

You might also like