Вы находитесь на странице: 1из 12

DATABASE MANAGEMENT SYSTEM

PROJECT REPORT

DEVELOPED BY
Sheikh Muhammad Javad 1612252
Umair Riaz 1612218
Varsha Mankani 1612214

SUBMIT TO
SIR ADEEL AHMED
BSCS(IV-F)

1|12
TABLE OF CONTENT

CONTENTS PAGE NUMBER


1. Introduction&Description 3
2. Relational ERD 4
3. Logical ERD 4
4. DDL 5
5. Roles 6
6. Users 6
7. Sequences 7
8. Forms 8-12

2|12
Introduction to Project

Introduction:
We are making a project which is based on Hotel Management System. It explains
that how room booking is done in a hotel. We put different entities in our project
like hotel, customers, order, room, payments, reservation, employees. This also
helps us to know the records of those whose has already booked the room. It
contains the detail of different rooms available in the hotel.

Description:
Hotel management system is for manage all room types room services. The
objectives of the automated Hotel management system is to simplify the day to
day processes of the hotel. The system will be able to handle many services to
take care of all customers in a quick manner. This gives us detail and record the
information in to the database. Manager is responsible for managing resources
available in hotel management system. Manager also has most of the privileges
mentioned about except the things regarding the payment handling. Customer
service representative will have access to the reservation/booking.

3|12
RELATIONAL ERD:

LOGICAL ERD:

4|12
DDL:
create table employess(employee_id int primary key,employee_name
varchar(50),employee_phoneint,employee_address varchar(200),employee_postion
varchar(50),employee_joined_

date);

create table customers(customer_id int primary key,customer_name


varchar(20),customer_ageint,customer_gender varchar(50), customer_phoneint,customer_addres
varchar(50));

create table room_type(type_id int primary key,room_type varchar(50),room_beds varchar(50));

create table room(room_no int primary key,type_idint,foreign key (type_id) references


room_type(type_id) ,room_stats varchar(50),room_price number(7,2));

create table food(food_id int primaykey,food_name varchar(50),food_price int;)

create table food_order(order_id int primary key,food_idint,foreign key (food_id) REFERENCES


food(food_id),customer_idint,foreign key (customer_id) REFERENCES
customers(customer_id),food_quantityint,order_date date);

create table reservation(reservation_id int primary key,room_noint,foreign key (room_no) REFERENCES


room(room_no),customer_idint,foreign key (customer_id) REFERENCES customers(customer_id),
check_in_datedate,check_out_datedate,reservation_datedate,reserved_by
varchar(50),customer_idint,foreign key (employee_id) REFERENCES employee(employee_id));

create table payments(bill_id int primary key,reservation_idint,foreign key (reservation_id) REFERENCES


reservation(reservation_id),order_idint,foreign key (order_id) REFERENCES
food_order(order_id),customer_id int ,foreign key (customer_id) REFERENCES
customers(customer_id),tota_amount int not null,total amount number(10,2));

create table hotel(hotel_id int primary key,address varchar(200),phone int,description varchar(2000));

5|12
USERS ROLES AND ITS PRIVILIGES:

Roles:

create role employee identified by hotel;

grant select on employee to employee;

create role customer identified by hotel;

grant select on room to customer;

Users:

create user reservation_manager identified by manager;

grant select ,delete,insert,update on reservation to reservation_manager;

grant select on room to reservation_manager;

grant select on room_type to reservation_manager;

create user finance identified by hotel;

grant select ,delete,insert,update on payments to finance;

create user deo identified by hotel;

GRANT CREATE SESSION, GRANT ANY PRIVILEGE TO hotel_owner;

create user hotel_owner identified by hotel;

GRANT CREATE SESSION, GRANT ANY PRIVILEGE TO hotel_owner;

6 |12
Viewindexes and sequence:

create index cus_index on


customers(customer_id,customer_name,customer_age,customer_gender,customer_phone,customer_a
ddress);

create index emp_index on


customers(employee_id,employee_name,employee_phone,employee_address,employee_position,emp
loyee_joined_date);

create sequence c1

start with 161200

increment by 1

nocycle;

7 |12
FROMS:

8|12
9|12
10|12
11|12
12|12

Вам также может понравиться