You are on page 1of 35

2nd year gc fo 2012

Group Member Name ID

1. Fentahun Amare ……………………………………………….com®022/09

2. Degu Atalay………………………………………………………….com®016/09

3. Hana Zeleke………………………………………………………..com® 031/09

4. Haile Tilaye……………………………………………………………com®029/09

5. Anduamlak Asmare………………………………………………..com®009/09

DTU, Ethiopia

Submitted date 03/04/2010 E.C

1
Acknowledgement
We would like to express our respect to our instructor. Mersha
for giving us this chance to work on database management
system for the hotel system. And also we would like to say
thanks for employees for giving us detail information about the
main library system. And also for all peoples who contribute in
this project we would like to say thank you .We will also like to
thank the student for caring out with our interview and giving
detail information.

A warm thank is extended to Debra Tabor university


instructors for sharing his resources, Opinions, knowledge,
experience and skills in programming and development
methodology, so generously. I would also like to personally
thank my God, our senior students, friends in Debra Tabor
University and my fellow course-mates who have one way or
another extended their assistance in completing this project.

2
Abstract

Hotel Management System HMS full database project that


consist of Design article and  Explanation  of entity  relationship 
diagram and it also consist of the mapping level.

This system involves the management of the hotel. It will allow


check-ins, check-outs, reservations, employee information
handling, displaying all the necessary information when needed,
a user accesses the system by entering his/her user name and
password which were previously defined by the hotel
owner/manager.  The clerk uses the system through a Graphical
User Interface (GUI)

3
Content

Title:-Fundamentals of Database Systems .................................................................1


Acknowledgement........................................................................................................2
Abstract.........................................................................................................................3
INTRODUCTION.............................................................................................................5
Outline of the project...................................................................................................6
Vision:-..........................................................................................................................6
Mission:.........................................................................................................................7
OBJECTIVE.....................................................................................................................7
Existing system:-...........................................................................................................8
Proposed system...........................................................................................................8
SCOPE OF THE PROJECT..............................................................................................10
Definitions and Acronym.............................................................................................11
Limitation of the project.............................................................................................11
Database Requirements..............................................................................................11
Hard ware and soft ware requirement....................................................................12
Hardware interface:-...................................................................................................12
14.2 Software interface:-........................................................................................12
Entity:..........................................................................................................................13
Relationship:...............................................................................................................13
Attribute:.............................................................................................................13
ER DIAGRAM...............................................................................................................14
Tables of entity.......................................................................................................16
Tables of entity.......................................................................................................16
SCHEMATIC DIAGRAM................................................................................................20
NORMALIZATION FORMS............................................................................................22
SQL PROGRAM............................................................................................................31

4
INTRODUCTION
Now a day’s there are more huge systems in the world and these
systems are their own role for the development of our world, and
for these many systems the hotel management system is one of
these huge systems.

THE HOTEL MANGEMENT SYSTEM is developed for medium size


and small hotel properties. so Hotel management system is the
system that we used to manage, organize and modernized the
hotel system and these system is used to save time and human
resource and it makes easy the whole hotel works and to satisfy
the customers by using software and database system.

5
Outline of the project
*Key activities:-

-forming a group

-Determine requirements

-Analyze a system

-Design new system

-Make:- EER diagram

-Schema structure of entity

*Key stack holders:-

- Customer

- Employee

Vision:-
To maximize the standard of the hotel management.

To change the manual hotel management system by computer


based system.

To buy their own hotelier to maximize their profit.

Mission:
To fulfill the customer’s needs properly.

To get a good income from their customer.

6
OBJECTIVE
The main objective of the entire activity is to automate the process of day to
day activities of Hotel like:

1.  Room activities,

2.  Admission of a New Customer,

3.  Assign a room according to customer’s demand, 

4.  Checkout of a customer,

5.  Storing information of suppliers and products,

6.  Storing employee information,

7.  Keep track of accounts payable and receivable.

Some other objectives are: 

• No data duplication 

• No Paper Work Required

• Time Efficient

• Cost Efficient 

• Automatic data validation 

• User friendly environment

• Data security and reliability

• Fast data insertion & retrieval

• Easy performance check

7
Existing system:-
• Problems of the statement
 Commonly most hotel management system are working its activities
manually .This manual system has its own drawback. Some of its
drawbacks are mentioned below:

 Transaction information (files) may be exposed to loss and damager.

 The file management system in the hotel is not secured

 Bed reservation is inapplicable manually and it is tired.

 To get one file(bill) out of the list we should be found through all the file
lists.

Therefore, getting one file is time taking and very boring in the manual
system.

 Mostly documentations are recorded by papers that demand more


storage places and resources.

 There is a problem associated with the duplication of file and resource


wastage currently in the system.

 Documentation of relevant information in papers is prone to damage


by different factors.

Additionally, sorting the papers and searching for specific information is very
difficult task.

Proposed system
 The aim or the purpose of the project about hotel management system
is to develop software, which can manage and keep the records of the
hotel .That is why the system is manual. At the end of implementing,
the computerized hotel management reservation system technologies
enables:

 Minimize data redundancy by using relational database

 Solve the problem of record keeping of manual system by using


computerized information system.

8
 The current system will be secured as much as possible.

 The Purpose or aim of our requirement document is to explain that


what the hotel management system should do

Build information storage system of every users and managers.

The customer to get service going to the hotel and he/she can make
connection with employee, then the employee without going any ware or
without asking anybody only by using this software he/she can do register a
customer ,telling any information about the hotel, rent halls etc . Thus, the
customer can save so much time and since it connect to the data base it
facilitate the whole performance of the system.

SCOPE OF THE PROJECT


The Hotel Management System provides a system to manage a hotel that has
increased in the number of rooms to satisfy the customers need. Without

9
automation the management of the hotel has become an unwieldy task. The
end users’ day-to-day jobs of managing a hotel will be simplified by a
considerable amount through the automated system. The system will be able
to handle many services to take care of all customers in a quick manner. The
system should be user appropriate, easy to use, provide easy recovery of
errors and have an overall end user high subjective satisfaction.

The scope of our project "Hotel Management System” is that it could be given
to any small/medium sized hotel so that they can maintain their room
reservations, employee details, product details, accounts payable and
receivable. In this project, we will keep track of information of employees
working in the hotel. We are also not managing restaurants in this project.

Definitions and Acronym


HMS – Hotel Management System

Char-character

Int-integer

10
Varchar- variable character available for Unicode or largest resizable
characters.

GUI-Graphical user interface

Limitation of the project


*this project limited by many factors

These are:-

 loss of money

 Loss of time

 The work load

 Take more time to decision

Database Requirements
 The database should be designed in such a way that it enhances the
efficient storage, retrieval and manipulation of all the information
associated. For instance all general information regarding an item
attribute should be stored in a particular table. The concerned users
should have the facility to query to the database and supply the basic
information easily. Security mechanisms should be provided so that
no confidential details should be accessible to unauthorized persons.
The

 Database should be organized in such a way that it helps in preparing


various essential summaries needed for users.

Hard ware and soft ware requirement

Hardware interface:-
 Operating system: window

 Hard disk: 4GB

 RAM: 256 MB

11
 Processor: Pentium(R) Dual-core CPU

 Flash: 8GB

 CD

14.2 Software interface:-


 Word pad

 Microsoft word 2007

 Microsoft Visio

 MS SQL server 2008

ER Diagram of the System

This part contains the entity relationship (ER) diagram


of the basic components of the system. They are five
entities that are represented by rectangle with their
corresponding attribute.

The attributes are represented by an oval shape circle.


Primary keys are represented by underlined attribute.

12
The derived attributes are represented by doted circle and
related to their entity by dotted line. Every member of the
system can only be one of student, Staff Member, or instructor
according to the busyness rule. This can be represented by the
library manager can register and delete book and user, this
forms tertiary relationship.

The E-R model uses few basic concepts in producing an E-R


diagram. These Concepts are:-

Entity

Relationship

Attribute

Entity:
An entity is an object or anything, which is distinguishable from
other objects.

Relationship:
A relationship is a meaningful association, a linking or
connection between enti-ties.

Attribute:
An attribute is any aspect quality or description of either an
entity or relation-ship.

ER DIAGRAM

 It also store data in the database related to.

13
14
Table: room
Tables of entity

Column name data type Constraint


Roomstatus Varchar null
Roomno Int _pk
Roomtype Varchar[21] _
Roomprice Float _

Table: hall
Field Name Data Type Continent Key Attribute

hall no Int Not Null Primary Key

Status Varchar(20) Not Null

Price float Not Null

Floor Varchar(20) Not Null

15
customer :-

Field Name Data Type Constraint Key Attribute

Fname Varchar(40) Not Null

mname Varchar(40) Not Null

Lname Varchar(40) Not Null

Age int Allow Null

empid int Not Null Primary key

Sex Char(6) Not Null

Contactnum Varchar(30) Allow Null

Address Varchar(20) Not Null

position Varchar(23) Not Null

salary float Allow Null

edulevel Varchar(15) Allow Null

Field Name Data Type Constraint Key Attribute

Fname Varchar(40) Not Null

mname Varchar(40) Not Null

Lname Varchar(40) Not Null

Age int Allow Null

16
empid int Not Null Primary key

Sex Char(6) Not Null

Contactnum Varchar(30) Allow Null

Address Varchar(20) Not Null

position Varchar(23) Not Null

salary float Allow Null

edulevel Varchar(15) Allow Null

Field Name Data Type Constraint Key Attribute

Fname Varchar(40) Not Null

mname Varchar(40) Not Null

Lname Varchar(40) Not Null

Age int Allow Null

empid int Not Null Primary key

Sex Char(6) Not Null

Contactnum Varchar(30) Allow Null

Address Varchar(20) Not Null

position Varchar(23) Not Null

salary float Allow Null

edulevel Varchar(15) Allow Null

Field Name Data Type Constraint Key Attribute

Fname Varchar(40) Not Null

17
mname Varchar(40) Not Null

Lname Varchar(40) Not Null

Age int Allow Null

empid int Not Null Primary key

Sex Char(6) Not Null

Contactnum Varchar(30) Allow Null

Address Varchar(20) Not Null

position Varchar(23) Not Null

salary float Allow Null

edulevel Varchar(15) Allow Null

Field Name Data Type Constraint Key Attribute

Fname Varchar(40) Not Null

mname Varchar(40) Not Null

Lname Varchar(40) Not Null

Age int Allow Null

empid int Not Null Primary key

Sex Char(6) Not Null

Contactnum Varchar(30) Allow Null

Address Varchar(20) Not Null

position Varchar(23) Not Null

salary float Allow Null

edulevel Varchar(15) Allow Null

18
Field Name Data Type Constraint Key Attribute

Fname Varchar(40) Not Null

mname Varchar(40) Not Null

Lname Varchar(40) Not Null

Age int Allow Null

empid int Not Null Primary key

Sex Char(6) Not Null

Contactnum Varchar(30) Allow Null

Address Varchar(20) Not Null

position Varchar(23) Not Null

salary float Allow Null

edulevel Varchar(15) Allow Null

Field Name Data Type Constraint Key Attribute

Fname Varchar(40) Not Null

mname Varchar(40) Not Null

Lname Varchar(40) Not Null

Age int Allow Null

empid int Not Null Primary key

Sex Char(6) Not Null

Contactnum Varchar(30) Allow Null

Address Varchar(20) Not Null

position Varchar(23) Not Null

salary float Allow Null

19
edulevel Varchar(15) Allow Null

Field Name Data Type Constraint Key Attribute

Fname Varchar(40) Not Null

mname Varchar(40) Not Null

Lname Varchar(40) Not Null

Age int Allow Null

empid int Not Null Primary key

Sex Char(6) Not Null

Contactnum Varchar(30) Allow Null

Address Varchar(20) Not Null

position Varchar(23) Not Null

salary float Allow Null

edulevel Varchar(15) Allow Null

Field Name Data Type Constraint Key Attribute

Fname Varchar(40) Not Null

mname Varchar(40) Not Null

Lname Varchar(40) Not Null

Age int Allow Null

empid int Not Null Primary key

Sex Char(6) Not Null

Contactnum Varchar(30) Allow Null

20
Address Varchar(20) Not Null

position Varchar(23) Not Null

salary float Allow Null

edulevel Varchar(15) Allow Null

Field Name Data Type Constraint Key Attribute

Fname Varchar(40) Not Null

mname Varchar(40) Not Null

Lname Varchar(40) Not Null

Age int Allow Null

empid int Not Null Primary key

Sex Char(6) Not Null

Contactnum Varchar(30) Allow Null

Address Varchar(20) Not Null

position Varchar(23) Not Null

salary float Allow Null

edulevel Varchar(15) Allow Null

Field Name Data Constr Key


Type aint Attrib
ute

Fname Varchar Not


(40) Null

mname Varchar Not


(40) Null

21
Field Name Data Type Constraint Key Attribute

Fname Varchar(40) Not Null


Lname
mname Varchar(40) Not Null Varchar Not
(40) Null
Lname Varchar(40) Not Null
Age int Allow
Age int Allow Null Null
empid
empid int Not Null int Primary
Not key
Prima
Null ry key
Sex Char(6) Not Null
Sex Char(6) Not
Contactnum Varchar(30) Allow Null Null
Address Varchar(20) Not Null
Contactnum Varchar Allow
position Varchar(23) Not Null (30) Null

Address
salary float Allow Null Varchar Not
(20) Null
edulevel Varchar(15) Allow Null
position Varchar Not
(23) Null

salary float Allow


Null

Varchar Allow
(15) Null

edulevel

Field Name Data Type Constraint Key Attribute

Fname Varchar(40) Not Null

mname Varchar(40) Not Null

Lname Varchar(40) Not Null

Age int Allow Null

empid int Not Null Primary key

22
Sex Char(6) Not Null

Contactnum Varchar(30) Allow Null

Address Varchar(20) Not Null

position Varchar(23) Not Null

salary float Allow Null

edulevel Varchar(15) Allow Null

23
Table: employee

Hotel Profile :-

24
SCHEMATIC DIAGRAM

25
RELATIONAL SCHEMA

26
27
SQL PROGRAM
SQL IMPLEMENTATION
CREATE DATABASE HMSDATABASESYSTEM

USE HMSDATABASESYSTEM

CREATE TABLE Hotel1

owner varchar(40) null,

hotelno int not null,

hname varchar(20) not null,

status varchar(30) not null

ALTER TABLE Hotel1

add primary key (hotelno);

----------------------------------------------

CREATE TABLE City

CitName char(20)not null primary key,

hotelno int foreign key references Hotel1(hotelno)

CREATE TABLE Employee

FName varchar(40) not null,

mName varchar(40) not null,

28
lName varchar(40) not null,

empIdNo int not null,

sex char(6) not null,

address varchar(30) not null,

phoneNo char(20) not null,

age int null,

position char(23) not null,

salary float not null,

educationalLevel char(15) null,

);

ALTER TABLE Employee

add primary key(empIdNo)

ALTER TABLE Employee

add foreign key (hotelno) references Hotel1(hotelno);

ALTER TABLE Employee

add hotelNo int null

CREATE TABLE Room

roomno int not null,

hotelno integer null,

type char(20) not null,

status varchar(20) not null,

price float not null,

AccNo int null

29
)

ALTER TABLE Room

add primary key (roomno);

alter table Room

add foreign key(AccNo) references Customer(AccNo);

alter table Room

add foreign key(hotelno) references hotel1(hotelno);

create table booking

roomno integer not null,

EmpIdNo int not null,

AccNo integer not null,

datefrom datetime not null,

dateto datetime not null

alter table booking

add foreign key(AccNo) references Customer(AccNo);

alter table booking

add foreign key(EmpIdNo) references Employee(EmpIdNo);

alter table booking

add foreign key(RoomNo) references Room(roomNo);

---------------------------

30
create table Customer

AccNo integer not null,

fname varchar(20) not null,

mname varchar(20) not null,

lName varchar(20) null,

address varchar(20) null,

PhoneNo varchar(20) not null,

sex char(6) null,

EmpIdNo int null

alter table Customer

add primary key(AccNo);

alter table Customer

add foreign key (EmpIdNo) references Employee(EmpIdNo);

-----------------------------------

CREATE TABLE HALL

HalNo int not null,

HalStatus varchar(20) not null,

Floor char(20) not null,

Price float not null,

AccNo int null,

HotelNo int null

31
)

alter table HALL

add foreign key(AccNo) references Customer(AccNo);

alter table HALL

add foreign key(hotelno) references hotel1(hotelno);

alter table HALL

add primary key(HalNo);

----------------------------------------------

alter table room

add foreign key(AccNo) references Customer(AccNo);

alter table room

add foreign key(hotelno) references hotel(hotelno);

alter table bookng

add foreign key(roomno) references room(roomno);

alter table bookng

add foreign key(hotelno) references hotel(hotelno);

alter table bookng

add foreign key(guestno) references guest(guestno);

------------------------------------

SELECT * FROM Hotel1

SELECT * FROM ROOM

SELECT * FROM booking

SELECT * FROM Customer

SELECT * FROM Employee

32
SELECT * FROM HALL

SELECT * FROM City

---------------------------------------------

insert into Hotel1 values('Tadele',01,'sara','friststar')

insert into Hotel1 values('Walle',012,'samarland','4star')

insert into Hotel1 values('Abebe',8,'beleunile','5star')

insert into Hotel1 values('Gashaw',05,'','5star')

insert into Hotel1 values('Tadele',01,'sara','friststar')

insert into Hotel1 values('Tadele',01,'sara','friststar')

----------------------------------------------------------

insert into HALL values(01,'siut',1,800,236,5)

insert into HALL values(03,'Bigsiut',2,900,2356,1)

insert into HALL values(02,'siut',4,1000,235,8)

----------------------------------------------------------

insert into Employee


values('Ermias','geberselasse','Belete',09,'m','A.A','0918342424',67,'manager',
1200,'degree',1)

insert into Employee


values('Belet','Ayele','Bekele',04,'m','A.A','0918342427',60,'Manager',1400,'de
gree',8)

insert into Employee


values('Ermias','gebere','Alene',12,'m','Hawassa','0918342924',45,'recieption',
1000,'certificate',8)

insert into Employee


values('Abebe','Alene','Belete',10,'m','A.A','0918342429',56,'receiption',9000,'
certificate',1)

-------------------------------------------------------

33
select * from ROOM

insert into ROOM values(10,1,'SINGLE','siut',2000,236)

insert into ROOM values(5,8,'DUBLE','delux',1000,236)

insert into ROOM values(8,1,'SINGLE','siut',1500,235)

--------------------------------------------

select * from booking

-- you must insert z values of guest befor booking

insert into booking values(10,1,235,'2005/8/8','2005/8/22')

insert into booking values(5,9,236,'2005/2/8','2005/2/9')

insert into booking values(8,3,2356,'2005/10/10','2005/11/22')

--------------------------

insert into Customer


values(2356,'ermias','geberselasse','Haile','RUSSIA','0918342424','m',09)

insert into Customer


values(236,'Belet','Gute','Haile','Hawassa','0916342424','m',5)

insert into Customer


values(23,'Haile','geberselasse','klugdx','RUSSIA','0918322424','m',7)

insert into Customer


values(235,'Gizienew','Asmare','Haile','ETHIOPIA','0948342424','m',11)

insert into Customer


values(235,'Gashaw','geberselasse','Haile','RUSSIA','0918342424','m',11)

insert into Customer


values(691,'almaz','kebbede','gonta','assmera','0978765443','f',10)

insert into Customer


values(543,'asefa','beya','lema','europ','39094995999','m',9)

--------------

insert into City values('BAHIR DAR',1)

34
insert into City values('AADDIS ABAB',8)

insert into City values('ASMERA',1)

insert into City values('ARGOBA',12)

insert into City values('NEW DELHI',12)

insert into City values('KAAARTUM',1)

insert into City values('GONDAR',5)

REFERENCES :
1. .ELMASRI TEXT BOOK
2. .WWW.google.com
3. TEACHER`S SLIDE
4. The Art of Analysis, by Dr. Art Langer, devotes considerable
space to
normalization. Springer-Verlag Telos (January 15, 1997)
ISBN: 0387949720
Dr. Codd's seminal 1969 paper on database normalization:
www.acm.org/classics/nov95
5. The Wikipedia article on normalization discusses all five normal
forms:
en.wikipedia.org/wiki/Database_normalization

THE END!!!
35

You might also like