Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
103 views30 pages

Mahati Dbms FINAL

This document describes a hotel management database system project created by students to manage various operations of a hotel. The project aims to streamline tasks like managing guest reservations, room allocation, billing, housekeeping schedules, and inventory. It comprises modules for front desk operations, accounting, and inventory management. The system allows staff to efficiently oversee activities and provides seamless service to guests.

Uploaded by

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

Mahati Dbms FINAL

This document describes a hotel management database system project created by students to manage various operations of a hotel. The project aims to streamline tasks like managing guest reservations, room allocation, billing, housekeeping schedules, and inventory. It comprises modules for front desk operations, accounting, and inventory management. The system allows staff to efficiently oversee activities and provides seamless service to guests.

Uploaded by

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

lOMoARcPSD|28011495

VISVESVARAYA TECHNOLOGICAL UNIVERSITY


Jnana Sangama, Belgaum-590018

A Database Management System Mini Project Report


on

HOTEL MANAGEMENT DATABASE SYSTEM


Submitted in Partial fulfillment of the Requirements for the V Semester of the Degree of

Bachelor of Engineering
In
Computer Science & Engineering
By
MAHATI SHITOLE
(3GN21AI050)
ADITYA NAVAKHANDE
(3GN21AI030)
SNEHAL TORNALKER
(3GN21AI053)
UDAYKIRAN BAWAGE
(3GN21AI057)

Under the Guidance of

Mrs. Netrawati S.
Asst Professor, Dept. of AIML

GURU NANAK DEV ENGINEERING COLLEGE BIDAR,


MAILOOR ROAD, BIDAR, KARNATAKA-585403
lOMoARcPSD|28011495

GURU NANAK DEV ENGINEERING COLLEGE BIDAR,


MAILOOR ROAD, BIDAR, KARNATAKA-585403

CERTIFICATE
This is to certify that the Database Management System Project work entitled Hotel
Management Database System has been carried out by Mahati Shitole (3GN21AI050),
Snehal Tornalker (3GN21AI053) , Udaykiran Bawage (3GN21AI057) and Aditya
Navakhande (3GN21AI030) bonafide students of Guru Nanak Dev Engineering College,
Bidar in partial fulfillment for the award of Bachelor of Engineering in Artificial
Intelligence and Machine Learning Engineering of the Visvesvaraya Technological
University, Belgaum during the year 2024-2025. It is certified that all corrections/suggestions
indicated for Internal Assessment have been incorporated in the Report deposited in the
departmental library. This DBMS Project Report has been approved as it satisfies the
academic requirements in respect of project work prescribed for the said degree.

----------------- -------------------
Signature of Guide Signature of HOD

Mrs. Netrawati S. Dr. Dayanand J.


Assistant Professor Professor, Head
Dept. of AIML, GNDECB Dept. of AIML, GNDECB

External Viva
Name of the examiners Signature with date
1.

2.
lOMoARcPSD|28011495

ABSTRACT

A hotel management system is a software application designed to manage and organize all
aspects of a hotel's operations. It is an essential tool for any hotel that wants to streamline its daily
tasks and improve its overall efficiency. The hotel management system comprises various modules
that help in managing different hotel activities, such as front desk operations, housekeeping,
accounting, and inventory management. The system allows hotel staff to manage guest reservations,
check-ins and check-outs, room allocation, and billing, all from a centralized location. This system
also helps to track the occupancy rate and revenue generated by each room in the hotel. The system
also assists in managing housekeeping operations, such as room cleaning schedules, laundry
management, and maintaining the inventory of toiletries and amenities. The system enables staff to
check the availability of rooms and plan cleaning schedules accordingly. Moreover, the system
includes accounting modules that enable hotels to keep track of expenses, revenue, and other
financial data. This module automates the billing process and generates invoices for services offered
to guests. It also generates financial reports that help hotel management in making informed
decisions. The hotel management system also helps manage inventory by keeping track of stock
levels, ordering and restocking supplies, and reducing wastage. The system also enables staff to
monitor the consumption of supplies and plan accordingly to prevent shortages. In conclusion, the
hotel management system is essential to manage their operations efficiently. It streamlines various
activities and helps in providing guests with a seamless experience. By automating repetitive tasks,
the system enables staff to focus on delivering excellent customer service and enhancing guest
satisfaction.
lOMoARcPSD|28011495

ACKNOWLEDGEMENT

It gives us a great sense of pleasure to present the report of the B.E Mini Project
undertaken during 5th Semester . We owe a special debt of gratitude to Dr. Dayanand J,
Head of Department of Artificial Intelligence and Machine Learning Engineering ,
Guru Nanak Dev Engineering College, Bidar for his constant support and guidance
throughout the course of our work. His sincerity, thoroughness and perseverance have
been a constant source of inspiration for us. It is only his cognizant efforts that our
endeavors have seen light of day. We also take the opportunity to acknowledge the
contribution of Mrs. Netrawati S. of Department of Artificial Intelligence and Machine
Learning Engineering, Guru Nanak Dev Engineering College, Bidar for her full support
and assistance during the development of the project. We also do not like to miss the
opportunity to acknowledge the contribution of all faculty members of the department for
their kind assistance and cooperation during the development of our project. And at last
but not the least, we acknowledge our friends for their contribution in the completion of
the project.

With Regards,
Mahati Shitole
Snehal Tornalker
Udaykiran Bawage
Aditya Navakhande
lOMoARcPSD|28011495

TABLE OF CONTENTS
ABSTRACT I
ACKNOWLEDGEMENT II

Chapter 1: INTRODUCTION

1.1 INTRODUCTION...................................................................................................... 2
1.2.....................................................................................PROBLEM STATEMENT 2

1.3.....................................................................................................OBJECTIVES 3

1.4............................................................................... SCOPE AND APPLICATIONS 5

CHAPTER 2: SYSTEM REQUIREMENTS

2.1 SOFTWARE REQUIREMENTS....................................................................................7


2.2 HARDWARE REQUIREMENTS....................................................................................8

Chapter 3: DESIGN
3.1ENTITY-RELATIONSHIP DIAGRAM............................................................................10
3.2SCHEMA DRAIGRAM................................................................................................ 11

CHAPTER 4: IMPLEMENTATIONS

4.1 CUSTOMER PAGE.................................................................................................. 14


4.2 ADMIN PAGE........................................................................................................ 17
4.3 SQL....................................................................................................................... 20

CHAPTER 5: CONCLUSION & FUTURE ENHANCEMENT

5.1 CONCLUSION.......................................................................................................... 24
5.2 FUTURE ENHANCEMENT........................................................................................24
5.3 BIBLIOGRAPHY....................................................................................................... 25
lOMoARcPSD|28011495

Hotel Management Database System

Chapter 1

1.1 INTRODUCTION
The hotel industry is one of the most significant contributors to the global economy. As the
industry grows, hotels are facing increasing pressure to streamline their operations and provide
exceptional guest experiences. One way to achieve this is by implementing a hotel management
system, which can help hotels automate their day-to-day tasks, manage their operations efficiently,
and improve customer service.

1.2 PROBLEM STATEMENT


A hotel system manages information about rooms, reservations, customers, and customer
billing. A customer can make reservations, change, or cancel reservations through the hotel website.
When a customer makes reservations, he/she needs to check if a room the customer wants to reserve
is available. If a room is available, the customer enters his/her information to the system and
receives a confirmation number from the web site.

A Front desk clerk checks in a customer with only a prior reservation, changes the checkout
date, and checks out the customer. A room is assigned to the customer at check-in time and a
customer billing record is created at that time. The customer billing record is updated every night at
12. When a customer checks out, the desk clerk prints the bill. A customer can pay by cash, check,
or credit card when he/she checks out.
lOMoARcPSD|28011495

Hotel Management Database System

1.3 OBJECTIVES

 The main objective of this project is to ensure reliable and efficient communication within
the hotel and avoid common input errors done by hotel staff.
 This project also aims for fast and easy retrieval of hotel guest records for faster reference
activities.
 Third main important objective of the Hotel management system project is to enforce
security measures to avoid unauthorized access to the customer record.
 Track guests based on their name, address, city and Track bookings based on dates, booking
type, and room count. Designate Room Types with a standard rate, room description.

1.4 SCOPE AND APPLICATIONS


The software to be developed deals with creating a Hotel Management system which will
automate the major hotel operations, billing and keeping track of records of daily transactions.
Admin have the authority to control and modify the database. The main goal of this automated
Hotel Management System software is to simplify the everyday process of hotels. Day to day
Hotels are increasing and they need to automate to provide customer ease of access.

It will be able to take care of services to customers in a quick manner. This automation will
be able to replace the drawbacks of large customer information physical files which were difficult
to handle. Secure Transaction, quick retrieval of information, ease of use, quick recovery of errors,
fault tolerance are some of the benefits that the development team will be working on to achieve
end user satisfaction.

A hotel management system is a software application designed to manage and automate


hotel operations, providing a variety of applications that can benefit hotel staff and guests alike.
Here are some of the most important applications for a hotel management system:

1. RESERVATION MANAGEMENT: The reservation management application allows guests to


book rooms online, and the system automates the booking process, ensuring that rooms are
allocated and updated in real-time. It also provides a way to manage reservations and cancellations.
lOMoARcPSD|28011495

Hotel Management Database System

2. FRONT DESK MANAGEMENT: The front desk management application helps hotel staff
manage guest check-ins and check-outs. It provides real-time access to guest information, room
availability, and room status, enabling staff to provide efficient and prompt service.

3. HOUSEKEEPING
MANAGEMENT : The
housekeeping management
application helps
staff schedule and manage
room cleaning, track the
availability of cleaning
supplies and
amenities, and manage laundry
services.
4. BILLING AND
ACCOUNTING : The billing
and accounting application
automates the
lOMoARcPSD|28011495

Hotel Management Database System

billing process and generates


invoices for services offered
to guests. It also generates
financial
reports, helping hotel
management make informed
decisions about revenue and
expenses.
5. MARKETING AND
GUEST MANAGEMENT :
The marketing and guest
management
application enables hotels to
track guest preferences and
create targeted marketing
campaigns to
lOMoARcPSD|28011495

Hotel Management Database System

attract and retain customers. It


also provides guest feedback
and reviews to help hotels
improve
their services.
In conclusion, a hotel
management system provides a
variety of applications that can
help
hotels streamline their
operations, improve customer
service, and stay competitive
in a rapidly
evolving industry. By
automating repetitive tasks
and providing real-time
access to critical
lOMoARcPSD|28011495

Hotel Management Database System

information, a hotel
management system can
improve the efficiency and
effectiveness of hotel
operations
3. HOUSEKEEPING
MANAGEMENT : The
housekeeping management
application helps
staff schedule and manage
room cleaning, track the
availability of cleaning
supplies and
amenities, and manage laundry
services.
4. BILLING AND
ACCOUNTING : The billing
lOMoARcPSD|28011495

Hotel Management Database System

and accounting application


automates the
billing process and generates
invoices for services offered
to guests. It also generates
financial
reports, helping hotel
management make informed
decisions about revenue and
expenses.
5. MARKETING AND
GUEST MANAGEMENT :
The marketing and guest
management
application enables hotels to
track guest preferences and
lOMoARcPSD|28011495

Hotel Management Database System

create targeted marketing


campaigns to
attract and retain customers. It
also provides guest feedback
and reviews to help hotels
improve
their services.
In conclusion, a hotel
management system provides a
variety of applications that can
help
hotels streamline their
operations, improve customer
service, and stay competitive
in a rapidly
evolving industry. By
automating repetitive tasks
lOMoARcPSD|28011495

Hotel Management Database System

and providing real-time


access to critical
information, a hotel
management system can
improve the efficiency and
effectiveness of hotel
operations
3. HOUSEKEEPING MANAGEMENT : The housekeeping management application helps staff schedule
and manage room cleaning, track the availability of cleaning supplies and amenities, and manage laundry
services.

4. BILLING AND ACCOUNTING : The billing and accounting application automates the billing process
and generates invoices for services offered to guests. It also generates financial reports, helping hotel
management make informed decisions about revenue and expenses.

5. MARKETING AND GUEST MANAGEMENT : The marketing and guest management application
enables hotels to track guest preferences and create targeted marketing campaigns to attract and retain
customers. It also provides guest feedback and reviews to help hotels improve their services.

In conclusion, a hotel management system provides a variety of applications that can help hotels
streamline their operations, improve customer service, and stay competitive in a rapidly evolving industry.
By automating repetitive tasks and providing real-time access to critical information, a hotel management
system can improve the efficiency and effectiveness of hotel operations.
lOMoARcPSD|28011495

Hotel Management Database System

Chapter 2

SYSTEM REQUIREMENTS

To demonstrate and work with this project there few hardware and software requirements
that are to be satisfied To work with any storage system we need a database installed into our
system and as this project is made as an stand alone application any frontend tool can be used to
design and develop it .The major Hardware and Software requirements are listed below.

2.1 Hardware requirements

● Any modern updated Operating System (preferably 64-bit architecture)


● Minimum of 4 GB Ram
● The Disk space mainly depends on the size of data we will be dealing with ,but
minimum of 1GB is sufficient

2.2 Software requirements

1. CLIENT SIDE:
Web Browser - - - Google Chrome or any compatible browser
Operating System - - - Windows or any equivalent OS

2. SERVER SIDE:
Web Server - - - APACHE
Server side Language - - - PHP5.6 or above version
Database Server - - - MYSQL
Web Browser - - - Google Chrome or any compatible browser
Operating System- - - Windows or any equivalent OS
lOMoARcPSD|28011495

Hotel Management Database System

Chapter 3

DESIGN
3.1 Entity-Relationship Diagram (ERD): Behind the scenes of a bustling hotel lies a
meticulously crafted database system. The ERD for a hotel management system visually represents
the relationships between entities such as hotels, rooms, visitors, bookings, staff, and payments.
Here are the key components:

o Entities:
 Hotel: Represents individual hotels in the system.
 Room: Represents different types of rooms available (e.g., single, double,
suite).
 Room Type: Describes room characteristics (e.g., capacity, amenities).
 Guest: Stores information about hotel guests.
 Booking: Records reservations made by guests.
 Staff: Manages hotel operations (e.g., receptionists, housekeeping).
 Payment: Tracks financial transactions related to bookings.

o Attributes:
 Hotel: Attributes may include hotel_id, name, location, and rating.
 Room: Attributes could be room_id, room_number, room_type_id, and
availability.
 Room Type: Attributes might include room_type_id, capacity, and
amenities.
 Guest: Attributes could be guest_id, name, contact_info, and loyalty_points.
 Booking: Attributes may include booking_id, check-in_date, check-out_date,
and total_cost.
 Staff: Attributes might include staff_id, name, role, and shift.
 Payment: Attributes could be payment_id, amount, and payment_date.

o Relationships:
 Guest-Booking: One guest can have multiple bookings (one-to-many).
 Room-Booking: Each booking corresponds to a specific room (many-to-
one).
 Hotel-Room: Each hotel has multiple rooms (one-to-many).
 Staff-Hotel: Staff members work at specific hotels (many-to-one).
 Booking-Payment: Each booking involves a payment (one-to-one).

3.2 Diagrams: The schema diagram for a hotel management system defines the structured
data groups and their relationships. It encompasses tables like rooms, payments, hotels, and
customers. Structured data elements interconnect, orchestrating check-in/check-out procedures,
room reservations, and financial transaction.
lOMoARcPSD|28011495

Hotel Management Database System


lOMoARcPSD|28011495

Hotel Management Database System

3.2.1 Entity-Relationship Diagram:

3.2.2 Schema Diagram:


lOMoARcPSD|28011495

Hotel Management Database System

Chapter 4

IMPLEMENTATION

4.1 CUSTOMER PAGE:


A hotel management system frontend would require an attractive and user-friendly interface to make
the system easy to use and navigate. CSS can be used to design the layout and styling of the web page,
including fonts, colors, and graphics. JavaScript can be used to add interactive elements to the frontend, such
as drop-down menus, pop-ups, and animations.
lOMoARcPSD|28011495

Hotel Management Database System

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=\, initial-scale=1.0">
<title>Hotel Management Sysytem</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-
Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="customer.css">
</head>
<body >
<!-- Navigation bar top -->
<nav class="navbar fixed-top navbar-expand-lg navbar-dark bg-dark ">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo01" aria-
controls="navbarTogglerDemo01" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarTogglerDemo01">
<a class="navbar-brand" href="#">Hotel Management System</a>
<ul class="navbar-nav ml-auto mt-2 mt-lg-0">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#room">Rooms</a>
</li>
<li class="nav-item">
<a class="nav-link " href="#about">About</a>
</li>
</ul>

</div>
</nav>
<!-- Background Image -->
<section >
<img id="background" src="Images/background.jpg" alt="">
</section>
<!-- Text -->
<section id="text">
<p class="text-1">Welcome to 5 &#11088; Hotel</p>
<p class="text-2">A Best Place To Stay</p>
</section>
<!-- Check Avability -->
<form action="customer.php" method="POST">
<div class="container check">
<span class="date">Check-in Date</span>
<input class="date-1" type="date" name="check-in-date" id="">
<span class="date">check-out Date</span>
<input class="date-1" type="date" name="check-out-date" id="">
<button class="check-button" type="submit" name="available_room">Check Avability</button>
</form>
</div>
<div class="container">
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "hotel-mangement-system";
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
if(isset($_POST['available_room'])){
$date = strtotime($_POST['check-in-date']);
lOMoARcPSD|28011495

Hotel Management Database System


$check_in= date('Y-m-d', $date );
$date = strtotime($_POST['check-out-date']);
$check_out= date('Y-m-d', $date );
$sql = "CALL available_room('$check_in','$check_out')";
$result = $conn->query($sql);
if($result){
?>
<br>
<table class="table table-striped table-light table-bordered">
<thead class="thead-dark"><tr>
<th>Room No</th>
<th>Floor No</th>
<th>Room name</th>
<th>No of Single Bed</th>
<th>No of Double Bed</th>
<th>No of Accomodate</th>
<th>Features</th>
<th>Price Per Day</th>
</tr></thead>

<tbody>
<?php while ($r = $result->fetch_array()): ?>
<tr>
<th scope="row"><?php echo $r['room_no'] ?></th>
<td><?php echo $r['floor_no'] ?></td>
<td><?php echo $r['room_name'] ?></td>
<td><?php echo $r['no_of_single_bed'] ?></td>
<td><?php echo $r['no_of_double_bed'] ?></td>
<td><?php echo $r['no_of_accomodate'] ?></td>
<td><?php echo $r['features'] ?></td>
<td><?php echo $r['amount'] ?></td>
</tr>
<?php endwhile;
?>
</tbody>
</table>
<?php
}
else{
echo "<script> alert('$conn->error'); </script>";
}} $conn->close();?>
</div>

<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "hotel-mangement-system";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}

$sql = 'CALL room_info(111)';


$result = $conn->query($sql);

$row = $result->fetch_assoc();
?>
<!-- Booking Room -->
<form action="customer.php" method="post">
<div class="container" id="room">
<div class="row">
<div class="col-sm">
<img class="room-image" src="Images/deluxe-1_1920x960.jpg" alt="">
lOMoARcPSD|28011495

Hotel Management Database System


</div>
<div class="col-sm">
<p class="price"><?php echo $row["amount"] ?>/- Per Day</p>
<p class="text"><?php echo $row["room_name"] ?> Room</p>
<?php $conn->close(); ?>
<!-- <input class="book-button" type="button" value="Book Now" name="book" onclick="openForm()"> -->
<!-- Button trigger modal -->
<button onclick="location.href='register.php'" type="button" class="book-button">Book Now</button>
</div>
</div>
</div>
</form>
<?php
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}

$sql = 'CALL room_info(222)';


$result = $conn->query($sql);

$row = $result->fetch_assoc();
?>
<div class="container">
<div class="row">
<div class="col-sm">
<img class="room-image" src="Images/super_deluxe-2_1920x960.jpg" alt="">
</div>
<div class="col-sm">
<p class="price"><?php echo $row["amount"] ?>/- Per Day</p>
<p class="text"><?php echo $row["room_name"] ?> Room</p>
<?php $conn->close(); ?>
<button onclick="location.href='register.php'" type="button" class="book-button">Book Now</button>
</div>
</div>
</div>
<?php
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$var=333;
$sql = "CALL room_info($var)";
$result = $conn->query($sql);

$row = $result->fetch_assoc();
?>
<div class="container">
<div class="row">
<div class="col-sm">
<img class="room-image" src="Images/luxury.jpg" alt="">
</div>
<div class="col-sm">
<p class="price"><?php echo $row["amount"] ?>/- Per Day</p>
<p class="text"><?php echo $row["room_name"] ?> Room</p>
<?php ?>
<button onclick="location.href='register.php'" type="button" class="book-button">Book Now</button>
</div>
</div>
</div>
lOMoARcPSD|28011495

Hotel Management Database System

<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-
ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-
JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>
lOMoARcPSD|28011495

Hotel Management Database System

4.2 Admin page:


lOMoARcPSD|28011495

Hotel Management Database System


lOMoARcPSD|28011495

Hotel Management Database System

4.3 SQL
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 13, 2021 at 04:18 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";


START TRANSACTION;
SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;


/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `hotel-mangement-system`
--

DELIMITER $$
--
-- Procedures
--
CREATE DEFINER=`root`@`localhost` PROCEDURE `available_room` (IN `date_in` VARCHAR(45), IN `date_out`
VARCHAR(45)) BEGIN
DECLARE msg varchar(128);
IF(date_in<CURRENT_DATE) THEN
set msg = 'Enter valid check in date.' ;
signal sqlstate '45001' set message_text = msg;
ELSEIF(date_out<=date_in) THEN
set msg = 'Enter valid check out date.' ;
signal sqlstate '45001' set message_text = msg;
ELSE
SELECT
room.room_no,room.floor_no,room_type.room_name,room_type.no_of_single_bed,room_type.no_of_double_bed,room_type.no_of
_accomodate,room.features,room.amount FROM room,room_type where room.room_no IN (SELECT room_status.room_no FROM
room_status WHERE room_status.check_out IS NULL OR room_status.check_out<date_in ) AND
room.room_code=room_type.room_code ;
END IF;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `cancel_booked_room` (IN `roomno` INT, IN `checkout` VARCHAR(45))


BEGIN
DECLARE msg varchar(128);
if(roomno NOT IN (SELECT room_booked.room_no FROM room_booked)) THEN
set msg = 'Enter valid room no.';
signal sqlstate '45011' set message_text = msg;
ELSEif(checkout NOT IN(SELECT room_booked.check_out FROM room_booked)) THEN
set msg = 'Enter valid check out date.';
signal sqlstate '45011' set message_text = msg;
ELSE
DELETE FROM room_booked WHERE room_booked.room_no=roomno and room_booked.check_out=checkout;
END IF;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `customer_previous_booking_info_with_payment_done` (IN `id` INT)


BEGIN
lOMoARcPSD|28011495

Hotel Management Database System

SELECT room_booked.room_no,room_booked.check_in,room_booked.check_out,room_booked.total_days,room.

features ,room.amount,room.features from room,room_booked where room_booked.customer_id IN (SELECT customer_id from


booking WHERE booking.payment_status=1 and booking.customer_id=id) and room.room_no=room_booked.room_no and
room_booked.payment_status=1;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `delete_room_from_admin` (IN `roomno` INT) BEGIN


DECLARE msg varchar(128);
IF(roomno ="") THEN
set msg = 'Room no. can not be empty.' ;
signal sqlstate '45001' set message_text = msg;
ELSEIF(roomno NOT IN (SELECT room.room_no FROM room)) THEN
set msg = 'Room does not exist.' ;
signal sqlstate '45001' set message_text = msg;
ELSE
DELETE FROM room WHERE room.room_no=roomno;
END IF;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `display_customer_info_who_booked_room` (IN `id` INT) BEGIN


SELECT customer.first_name,customer.last_name,customer.gender,customer.email,customer.contact_no,customer.nationality from
customer WHERE customer.customer_id=id;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_customer_id_p` (IN `name` VARCHAR(45)) BEGIN


SELECT customer.customer_id from customer where username=name;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_customer_info` (IN `id` INT) BEGIN


SELECT customer.first_name,customer.last_name,customer.gender,customer.contact_no,customer.email FROM customer WHERE
customer.customer_id=id;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `payment_info` (IN `id` INT) BEGIN


SELECT
room_booked.room_no,room_booked.check_in,room_booked.check_out,room_booked.total_days,room.features ,room.amount,room
_booked.payment_status,room_booked.total_amount from room,room_booked where room_booked.customer_id=id and
room.room_no=room_booked.room_no;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `show_all_room` () BEGIN


SELECT * FROM room;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `show_all_rooms_for_customer` () BEGIN


SELECT
room.room_no,room.floor_no,room_type.room_name,room_type.no_of_single_bed,room_type.no_of_double_bed,room_type.no_of
_accomodate,room.features,room.amount FROM room,room_type where room.room_code=room_type.room_code;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `update_room_features` (IN `roomno` INT, IN `features` VARCHAR(256))


BEGIN
DECLARE msg varchar(128);
IF(features ="") THEN
set msg = 'Features can not be empty.' ;
signal sqlstate '45001' set message_text = msg;

ELSEIF(roomno NOT IN (SELECT room.room_no FROM room)) THEN


set msg = 'Room does not exist.' ;

signal sqlstate '45001' set message_text = msg;


ELSE
lOMoARcPSD|28011495

Hotel Management Database System

UPDATE room SET room.features=features WHERE room.room_no=roomno;


END IF;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `update_room_price` (IN `roomno` INT, IN `price` INT) BEGIN
DECLARE msg varchar(128);
IF(price<=0) THEN
set msg = 'Price should be greater than 0.' ;
signal sqlstate '45001' set message_text = msg;
ELSEIF(roomno NOT IN (SELECT room.room_no FROM room)) THEN
set msg = 'Room does not exist.' ;
signal sqlstate '45001' set message_text = msg;
ELSE
UPDATE room SET room.amount=price WHERE room.room_no=roomno;
END IF;
END$$

DELIMITER ;
lOMoARcPSD|28011495

Hotel Management Database System

Chapter 5

5.1 CONCLUSION
In conclusion, the hotel management system we have developed provides a comprehensive
solution to the various challenges faced by hotels in managing their day-to-day operations. The
system's robust features, such as its automated billing and payment processing, help hotels improve
their operational efficiency and reduce the likelihood of errors. Overall, we believe that our hotel
management system will help hotels provide a superior guest experience, leading to increased guest
satisfaction and loyalty. Our hotel management system has been designed to meet the unique needs
of today's hospitality industry, which requires efficient and streamlined processes to remain
competitive. With this system, hotel managers can easily track and manage their hotel's
performance, from room occupancy rates to revenue generation. We are confident that our hotel
management system will prove to be a valuable asset to hotels of all sizes. The hotel management
system we have developed offers a user-friendly interface that enables hotel staff to easily manage
all aspects of their operations. Our system simplifies the work of hotel staff, freeing up their time to
focus on providing exceptional service to guests. Moreover, our system's analytics and reporting
features provide hotel managers with valuable insights into their hotel's performance, enabling them
to make data-driven decisions that can positively impact their business. Overall, we believe that our
hotel management system will help hotels achieve operational excellence and deliver exceptional
guest experiences.

5.2 FUTURE ENHANCEMENT


Future enhancements to the Hotel Management System could include the integration of
emerging technologies such as Artificial Intelligence, Machine Learning, and the Internet of Things
(IoT). These technologies could enable the system to provide personalized recommendations to
guests, optimize energy consumption, and automate routine tasks further. The integration of mobile
applications could also enhance the system, enabling guests to access hotel services and make
bookings through their smartphones. This would improve the overall guest experience and increase
guest engagement. Another area of enhancement could be the integration of blockchain technology
to enhance data security and privacy. This would enable hotels to store and manage guest data more
securely and transparently, improving guest trust and confidence in the hotel's operations.
lOMoARcPSD|28011495

Hotel Management Database System

5.3 BIBLIOGRAPHY

1. Fundamentals of Database Systems, Ramez Elmasri and Shamkant B. Navathe, 7 7th


Edition, 2017, Pearson.
2. Xampp tutorial on how to create database
3. PHP project models and databases
4. Geeksforgeeks tutorials for HTML

You might also like