Presentation Hotel Management System SQL

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 20

HOTEL DATABASE

MANAGEMENT
SYSTEM
Prepared By – Adityavardhan Tiwari
Table of contents 1. Introduction
2. ERR Diagram
In a nutshell, this shows what we are
going to cover today in our 3. Tables & Relationships
presentation of “Hotel Database
Management System”. 4. Normalization
It will be around 10 minutes
presentation. We would be more than 5. Queries, Views, Triggers
happy to answer your questions at
the end of the presentation!
6. Challenges

2
The main objective of this
project is to create a
database management
system for a hotel.
It was fun working together, overcoming each other’s
flaws together and learning from each other's
strengths in respective areas of Database Design &
Management.

3
A Hotel
consists of a
wide areas to ROOMS BOOKINGS

manage. We
tried to include
HOTEL
the main areas
for a hotel
management
system in this EMPLOYEES GUESTS

project.

4
Step:1
ERR-Diagram

5
6
7
Let us begin exploring the TABLES

8
hotel_chain table consists of information
related to a hotel chain. hotel_chain_id – This
is the primary key of the table. It has Not Null
constraint and Unique constraint.
hotel_chain_head_office_address_id – This is a
foreign key which is related to the addresses
table. hotel_chain table has one-to-one
relationship with the addresses table and
many-to-many relationship with the hotel
table. This results into a linking table
hotel_chain_has_hotel.

9
hotel table contains information about a
particular hotel.

hotel_id – This is the primary key of the


table. It has Not Null constraint and Unique
constraint.

Addresses_address_id – This is the foreign


key which is related to the addresses table.

Star_ratings_star_rating – This is the foreign


key which is related to the star_ratings table.

This table has many-to-many relationship


with the hotel_chain table, one-to-one with
star_rating, addresses, rooms_booked tables,
one-to-many with employees, bookings,
rooms, hotel_services tables.

10
star_ratings table consists only two columns.
The star_rating column is a primary key consists
of the rating of the hotel. And
star_rating_image stores the image of the
star_rating.
It has got one-to-one relationship with the
hotels table.

11
Room_type table has the information about the
room of each type. The primary key of the table is
room_type_id.
It has got one-to-many relationship with rooms
table.

rooms table contains data about the rooms of the


hotel. The primary key of this table is room_id and
this table has two foreign keys,
rooms_type_rooms_type_id and hotel_hotel_id.
This table has many-to-one relationships with the
hotel and room_type tables.

12
Room_rate_discount is the table that contains information
about the discount depending on month of the year for each
room type. The primary key of the table is discount_id and it
has the foreign key rooms_type_rooms_type_id. This table
has many-to-one relationship with the room_type table

hotel_services_used_by_guests table
contains info about the services used by the
guests. Primary key is service_used_id & two
foreign keys, hotel_services_service_id, which
relates to hotel_services table &
bookings_booking_id relates to bookings
table.

13
department table contains the data about the
different departments of the hotel. The primary
key is department_id, which creates a one-to-
many relationship with the employees table.

employees table consists of data related to the


employees.
The primary key is employee_id. There are three foreign
keys, service_id that denotes many-to-one relations with
the department table.
address_id that denotes one-to-one relationship with
the addresses table.
hotel_id that denotes many-to-one relationship with the
hotel table.

14
addresses table defines the information about the
address of guests, hotels, hotel chains, employees.
The primary key of the table is address_id.
It maintains one-to-one relationship with tables,
hotel_chain, hotel, employees and guests.

15
guests table has the data about the guests that
check in to the hotel. The primary key of this
table is guest_id.
There is one foreign key in this table, address_id
that has one-to-one relationship with the
address table.

16
Normalization
Process
We achieved the first
normal form by keeping
the data scalar. Third
Coming to the second Second Normal
First Normal Form Normal
normal form, we tried to Form
Form
make the relationships
depend on the primary
key.
On the third normal for,
we made sure that all the
dependencies are only on
the primary key of the
tables.

17
QUERIES
To execute the required tasks and fetch the data from one or more
tables.

VIEWS
To view the details of employees along with their departments and
also the details of the guests.

TRIGGERS
To create a Booking Audit table and store information about insert
and delete bookings records.

18
19
Challenges Faced
We faced most of the challenges in creating relationships among tables.
We need to make sure that all the relationships created among tables are logical
and follow the normalization rules.
The most challenging part was creating the booking and the rooms table and its
relationships with other respective tables.

20

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy