Restaurant Management System
Restaurant Management System
II Year
13R21A0 Ch. Vishnu Sai
COMPUTER SCIENCE AND ENGINEERING
5B5 Reddy
13R21A0 II Year
5B6 Ch.Ravi Kiran COMPUTER SCIENCE AND ENGINEERING
II Year
13R21A0
G.Sai Prasad COMPUTER SCIENCE AND ENGINEERING
5C1
13R21A0 II Year
G.S.S.Kireeti COMPUTER SCIENCE AND ENGINEERING
5C6
•The primary objective of the project is to
develop a data base on restaurant
management system . By using this
project,students get an clear idea on how
the data base works and how to use.
•By working on this project students are
able to understand the uses and
accessing of data base systems.
• A database management system is system software for
creating and managing databases.The DBMS provides the
users and programmers with a systematic way to
create,retrieve,update and manage data.
• The micro-project on Restaurant management system
helps to understand how the data bases work in restaurants
and hotels.Every restaurant have many entities and every
entity has many attributes.By identifying the entities
,attributes and relations in the restaurant management system
it becomes easier to go forward and work on it.
• Firstly we come up with identifying all the entities ,attributes
and relations in the data base and later building up a E-R
diagram which gives an overview of the data base.The
construction of E-R diagram comes in External level (or) View
level.
IDENTIFICATION OF ENTITIES:-
1) Restaurant
2) Casher
3) Bill
4) Manager
5) Customer
6) Chef
7) Waiter
8) Item
9) Order
IDENTIFICATION OF ATTRIBUTES FOR RESTAURANT :-
1) Name
2) Ph.no
3) Address
IDENTIFICATION OF ATTRIBUTES FOR CASHER:-
1) Bill no.
2) Name
IDENTIFICATION OF ATTRIBUTES FOR BILL:-
1) Order Detail
2) Bill no.
3) Amount
IDENTIFICATION OF ATTRIBUTES FOR MANAGER:-
1) Manager idno.
2) Name
IDENTIFICATION OF ATTRIBUTES FOR CUSTOMER:-
1) Name
2) Phone no.
3) Address
4) Customer id
IDENTIFICATION OF ATTRIBUTES FOR CHEF:-
1) Name
2) Chef id.no
IDENTIFICATION OF ATTRIBURES FOR WAITER:-
1) Name
2) Id no.
IDENTIFICATION OF ATTRIBUTES FOR ITEM:-
1) Item no.
2) Amount
3) Quantity
4) Description
IDENTIFICATION OF ATTRIBUTES FOR ORDER:-
1) No. of items
2) Order no.
RELATIONS:-
1) Restaurant HAS Manager
2) Restaurant HAS Casher
3) Bill PAID to Casher
4) Manager TELLS Chef
5) Manager TAKES Order
6) Customer PLACES Order
7) Customer PAYS Bill
8) Waiter BRINGS Order
9) Waiter DELIVERS TO Customer
10)Chef PREPARES Order
11)Order CONTAINS Item
The External level/View level of the data base is
represented in the form of E-R diagram.The Entity-
Relationship diagram gives the basic idea of how the data
base is developed.This is also called as E-R model of data
base.
Er-diagram
•This is implemented by using oracle.Before
this we have to convert the above E-R diagram
into tables i.e into Relational model . The
Conceptual level or Logical level has
different models such as Network
model,Hierarchial model etc,where as
Relational model is among the models of
Conceptual level.
TABLE FOR RESTAURANT:-
Name Ph.no Address
MARRIOTT 040-27976816 HYDERABAD
133221 SANDEEP
144331 VIKRAM
155442 RAHUL
166221 GAUTAM
TABLE FOR BILL:-
ORDER DETAIL BILL No. AMOUNT
BIRYANI 122321 Rs.550/-
ROTI & CURRY 133221 Rs.450/-
MANCHURIA 144331 Rs.250/-
CHOUPSEY 155442 Rs.300/-
FINGER CHIPS 166221 Rs.200/-
In the above table the Manager IdNo. gives Name of the manger that
means manger id acts as candidate key and the remaining non-key
attribute depends on key attribute.Hence the table is in BCNF already.
FUNCTIONAL DEPENDANCY:-
Manager ID No.-->NAME
TABLE FOR BILL:-
ORDER DETAIL BILL No. AMOUNT
BIRYANI 122321 Rs.550/-
ROTI & CURRY 133221 Rs.450/-
MANCHURIA 144331 Rs.250/-
CHOUPSEY 155442 Rs.300/-
FINGER CHIPS 166221 Rs.200/-
In the above table the attribute BillNo. gives both OrderDetail and
Amount.Here BillNo. acts as candidate key,remaining non-key attributes
depends on key attributes.Therefore the tables is already in BCNF.
FUNCTIONAL DEPENDENCY:-
BillNo.-->Orderdetail,Amount.
TABLE FOR CUSTOMER:-
NAME PHONE No. ADDRESS
CUSTOMER
ID
111 MAYANK 9989899121,9911111 PARADISE
111
222 KRISHNA 7842784212 BANNERGHUTTA
333 VENKAT 8989858512 AZAD ROAD
444 HASINI 994949122 AGRA
It is not in 1NF because 1NF says that every cell should
555 SUJANA 998288282 BAGA
In the above table the Chef IdNo. gives Name of the chef that means chef
idno acts as candidate key and the chef name which is a non-key attribute
depends on key attribute(chef idno.).Hence the table is in BCNF already.
FUNCTIONAL DEPENDANCY:-
ChefIdNo.-->Name
TABLE FOR WAITER:-
NAME ID No.
SAI CHANDRA 2234
P.SAMPATH 3321
CHARAN 4321
MAHESH REDDY 4431
GIRISH GOUD 3211
In the above table the Waiter IdNo. gives Name of the Waiter that means
Waiteridno acts as candidate key and the Waiter name which is a non-key
attribute depends on key attribute(Waiter IdNo.).Hence the table is in BCNF
already.
FUNCTIONAL DEPENDANCY:-
WaiterIdNo.-->Name
TABLE FOR ORDER:-
ITEM No. ORDER No.
No. AMOUNT QUANTITY DESCRIPTIO OF
N ITEMS
001 Rs.550/- HALF KG BIRYANI 2 25
020 Rs.450/- 2& ROTI & CURRY 3 36
100gms
050 Rs.250/- 250 gms MANCHURIA 4 44
093 Rs.300/- 200 gms CHOUPSEY 1 ` 49
123 Rs.200/- 150 gms FINGER CHIPS 2 52
The above table is not in 3NF because there exists transitivity .
FUNCTIONAL DEPENDENCY:-
OrderNo.-->No. of items,Description,ItemNo.
ItemNo.-->Amount,Qunatity,Description.
OrderNo.-->Description
The transitivity is of the form:-
If AB
Bc
thenAC
Here A is OrderNo.,B is ItemNo and C is Description.To avoid this condition we
need to break the table that is decomposing the table to obtain BCNF.
TABLE FOR
ITEM:-
ITEM No. AMOUNT QUANTITY DESCRIPTION
001 Rs.550/- HALF KG BIRYANI
020 Rs.450/- 2 & 100gms ROTI & CURRY
050 Rs.250/- 250 gms MANCHURIA
093 Rs.300/- 200 gms CHOUPSEY
123 Rs.200/- 150 gms FINGER CHIPS
Now the table for item is in BCNF because the attribute ITEMNo. acts as candidate key
and all the remaing non-key attributes are dependent on key attribute.
FUNCTIONAL DEPENDENCY:-
ITEMNo.-->Amount,Quantity,Description
ORDER DETAIL BILL No. AMOUNT
BIRYANI 122321 Rs.550/-
ROTI & CURRY 133221 Rs.450/-
MANCHURIA 144331 Rs.250/-
CHOUPSEY 155442 Rs.300/-
FINGER CHIPS 166221 Rs.200/-
2)Creation of audit_restaurant:
BEGIN
4) Execution :
A)SELECT * FROM restaurant;
Applications:-