Computer Project
Computer Project
Biswabrata Sarkar
has successfully completed his Computer
Science project titled
Hotel Management
under the supervision and guidance of
Monojit Maji
in the partial fulfilment of the Computer
Science practical
assessment conducted during the
academic year
2024-2025.
_____________ _____________
Examiner Teacher
Acknowledgement
I would like to express my immense gratitude to
my Computer Science teacher Monojit Maji sir for
the help and guidance he provided for
completing this project.
I also thank my parents who gave their ideas and
inputs in making this project. Most of all I thank
our school management, for providing us the
facilities and opportunity to do this project.
Lastly, I would like to thanks my classmates who
have done this project along with me. Their
support made this project fruitful.
HARDWARE AND
SOFTWARE REQUIRED
HARDWARE
1. PC
2. MOBILE PHONE
SOFTWARE
1. PYTHON (latest version)
2. MYSQL
3. PYTHON-MYSQL CONNECTOR
Contents
Sl.
No.
Topics
1. About Hotel
2. Introduction
3. Python Codes
4. Screenshots
5. Conclusion
6. References
HOTEL
A hotel is a commercial establishment that provides lodging,
accommodation, and other services to travellers or tourists.
Hotels typically offer a range of rooms or suites with varying
levels of amenities and services. These establishments can
vary widely in size and style, from small boutique hotels to
large luxury resorts.
Key features of hotels include:
1. Accommodation: Hotels provide rooms or suites for guests to
stay overnight or for an extended period.
2. Services: In addition to lodging, hotels often offer various
services such as room service, housekeeping, concierge, and
facilities like restaurants, gyms, swimming pools, conference
rooms, and more.
3. Classification: Hotels are often classified based on factors like
their size, amenities, and overall quality. Common
classifications include budget/economy hotels, mid-range
hotels, and luxury hotels. 4. Booking: Guests typically make
reservations to secure their accommodations in advance. This
can be done through various means, including online booking
platforms, travel agencies, or directly with the hotel.
5. Hospitality Industry: Hotels are an integral part of the
hospitality industry, which encompasses businesses that
provide services to travellers and customers seeking leisure
and comfort.
Overall, hotels play a crucial role in the travel and tourism
industry, offering a temporary home away from home for
individuals and groups seeking accommodation during their
travels.
INTRODUCTION
The Hotel Management System (HMS) is a comprehensive
software solution designed to streamline and optimize the
operations of hotels and hospitality establishments. This
integrated system combines various modules to efficiently
manage different aspects of hotel functions, from reservation
and guest services to billing and inventory management.
The reservation module of the HMS enables seamless booking
processes, allowing guests to make reservations online or
through the front desk. It maintains a centralized database of
room availability, ensuring accurate and up-to date information.
The system also facilitates quick check ins and check-outs,
enhancing the overall guest experience.
Efficient guest services are a hallmark of the HMS, which
includes features such as room service management,
housekeeping, and personalized guest preferences. This
ensures a high level of customer satisfaction and loyalty.
Additionally, the system automates routine tasks, freeing up
staff to focus on providing exceptional service.
Financial management is another key component,
encompassing billing, invoicing, and reporting. The HMS
generates detailed financial reports, helping hotel owners and
managers make informed decisions to maximize profitability. It
also integrates with point-of-sale systems, managing various
revenue streams such as restaurants, bars, and spa services.
Inventory management is crucial for maintaining optimal stock
levels in areas like housekeeping supplies and food and
beverage items. The HMS tracks inventory, automates
reordering processes, and minimizes wastage, contributing to
cost efficiency.
Security features, including user access controls and data
encryption, safeguard sensitive information and ensure
compliance with privacy regulations. The system also aids in
marketing efforts through guest relationship management
(CRM) tools, allowing hotels to personalize promotions and
loyalty programs.
In conclusion, the Hotel Management System is an
indispensable tool for modern hotels, enhancing operational
efficiency, improving guest satisfaction, and ultimately
contributing to the success of hospitality businesses.
Key features of a Hotel Management System typically include:
1. Reservation Management: Allows the hotel staff to efficiently
handle room bookings, cancellations, and modifications. It helps
in managing room availability, rates, and guest preferences.
2. Front Desk Operations: Enables the front desk staff to check-
in/check-out guests, generate room keys, and manage guest
information. It may also include features like guest folio
creation and invoice generation.
3. Billing and Invoicing: Handles the financial aspects of guest
stays, including room charges, additional services, and taxes. It
generates invoices and receipts for guest.
4. Inventory Management: Tracks and manages hotel inventory,
including housekeeping supplies, linens, and other materials.
This helps in maintaining optimal stock levels and preventing
shortages.
5. Housekeeping Management: Streamlines housekeeping tasks
such as room cleaning schedules, maintenance requests, and
inventory restocking. It ensures rooms are prepared efficiently
for incoming guests.
6. Reporting and Analytics: Provides detailed reports and
analytics on various aspects of hotel operations, allowing
management to make informed decisions. Reports may cover
occupancy rates, revenue, and guest demographics.
7. Point of Sale (POS): Manages the hotel's various Revenue -
generating outlets such as restaurants, bars, spa, and other
services. It helps in tracking sales, inventory, and generating
bills.
8. Guest Relationship Management (CRM): Helps in building and
maintaining relationships with guests by managing guest
profiles, preferences, and feedback. This can lead to
personalized services and improved guest satisfaction.
9. Security and Access Control: Ensures the security of guest
data and property by implementing access controls and
monitoring systems. It may include features like key card
access and surveillance.
10. Channel Management: Manages the distribution of room
inventory across various online booking channels to optimize
occupancy rates and maximize revenue.
11. Implementation: Implementing a Hotel Management
System not only enhances operational efficiency but also
contributes to a better overall guest experience. The system
can be tailored to meet the specific needs of different types
and sizes of hospitality establishments, including hotels,
resorts, motels, and bed-and-breakfasts.
Python Codes
Code 1:
import mysql.connector
db1 = None
def connect():
global db1
db1 = mysql.connector.connect(host="localhost",user="root",
password="Ankit1234"
)
connect()
c1 = db1.cursor()
c1.execute("create database hotel")
c1.execute("use hotel")
c1.execute("create table rooms(romm_no integer,type varchar(50),location
varchar(30),no_of_guest integer,rent integer, status varchar(20))")
c1.execute("create table billing(cname varchar(20),idtype varchar(40),idno
varchar(40), address varchar(50), phone varchar(10),gender varchar(20),
dcheckin date,room_no integer)")
c1.execute("create table booking(cname varchar(20),idno varchar(40),idtype
varchar(40), address varchar(50), phone varchar(10),gender varchar(20),
dateofcheckin date,room_no integer)")
db1.commit()
Code 2:
import mysql.connector as mycon
con =
mycon.connect(host="localhost",user="root",password="Ankit1234",database=
"hotel")
def showmenu():
while True:
print("@" * 30)
print("---- HOTEL AWANA ----")
print("@" * 30)
print("Press 1 - Create a New Room")
print("Press 2 - Show All Rooms")
print("Press 3 - Show All Vacant Rooms")
print("Press 4 - Show All Occupied Rooms")
print("Press 5 - Book a Room")
print("Press 6 - Check Out")
print("Press 7 - Exit")
choice = int(input("Enter your choice : "))
if choice == 1:
createRoom()
elif choice == 2:
showRooms()
elif choice == 3:
showVacantRooms()
elif choice == 4:
showOccupiedRooms()
elif choice == 5:
bookRoom()
elif choice == 6:
checkout()
elif choice == 7:
break
def createRoom():
print(" --- ENTER ROOM DETAILS --- ")
rno = int(input("Enter Room No. : "))
type = input("Enter Room Type(Simple/Delux/Super Delux):")
guest = int(input("Enter maximum number of guests : "))
loc = input("Enter Location details : ")
rent = int(input("Enter Per Day Charges : "))
status = "Vacant"
q = "insert into rooms values(%s,%s,%s,%s,%s,%s)"
data = (rno,type,loc,guest,rent,status)
cr1 = con.cursor()
cr1.execute(q,data)
con.commit()
print("--- Room Created Successfully ---")
def showRooms():
q = "select * from rooms"
cr1 = con.cursor()
cr1.execute(q)
res = cr1.fetchall()
for row in res:
print(row)
def showVacantRooms():
q = "select * from rooms where status='Vacant'"
cr1 = con.cursor()
cr1.execute(q)
res = cr1.fetchall()
for row in res:
print(row)
def showOccupiedRooms():
q = "select room_no, cname, phone from rooms,booking where
status='Occupied' and romm_no = room_no"
cr1 = con.cursor()
cr1.execute(q)
res = cr1.fetchall()
for row in res:
print(row)
def bookRoom():
print("-" * 40)
print(" BOOKING A ROOM ")
print("-" * 40)
cname = input("Enter the Customer Name : ")
idtype = input("Enter the ID submitted(PAN Card/License/Aadhar
Card/Passport) : ")
idno = input("Enter the ID number : ")
address = input("Enter Address : ")
phone = input("Enter Phone number : ")
gender = input("Enter Gender : ")
dcheckin = input("Enter Date of Check in (yyyy-mm-dd) : ")
room_no = int(input("Enter Room number : "))
q=”insert into
booking(cname,idno,idtype,address,phone,gender,dateofcheckin,room_no)
values(%s,%s,%s,%s,%s,%s,%s,%s)"
data = (cname,idno,idtype,address,phone,gender,dcheckin,room_no)
cr = con.cursor()
cr.execute(q,data)
con.commit()
q = "update rooms set status='Occupied' where romm_no ="+ str(room_no)
cr.execute(q)
con.commit()
print("-" * 50)
print(" ROOM BOOKED")
print("-" * 50)
References
Class 12 CS Sumita Arora book
Class 11 CS Sumita Arora Book
MySQL
Python IDLE