0% found this document useful (0 votes)
25 views

Restaurant Management System

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

Restaurant Management System

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

MLR INSTITUTE OF TECHNOLOGY

COMPUTER SCIENCE & ENGINEERING


MICRO PROJECT
Faculty Name: Mrs . POONAM KHARE
Title of the Project: RESTAURANT MANGEMENT SYSTEM
Team Members Details :-
HTNO NAME DEPARTMENT/YEAR

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

HOTEL VICEROY 040-66595754 BANGLORE

TAJ MAHAL 0891-66432342 MUMBAI

SHAN BAGH 9822882221 DELHI

RIVERSIDE 040-66762361 GOA

TABLE FOR CASHER:-


Bill no NAME

122321 ANUDEEP SINGH

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/-

TABLE FOR MANAGER:-

MANAGER ID No. NAME


1231 VIJAY RATHOD
1332 ANUP RUBENS
1443 SURYA SETH
1554 AJAY YADAV
1665 SUKESH REDDY
TABLE FOR WAITER
NAME ID No.

SAI CHANDRA 2234


P.SAMPATH 3321
CHARAN 4321
MAHESH REDDY 4431
GIRISH GOUD 3211

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
555 SUJANA 998288282 BAGA
TABLE FOR CHEF:-
NAME CHEF ID No.
BHAGAT SINGH AA23
HITHESH REDDY A123
SUHAS NAIDU BB22
NAYEEM B123
SAHITHI C112
TABLE FOR ORDER:-

ITEM QUANTITY No.oF ORDER No.


No. AMOUNT DESCRIPTIO ITEMS
N

001 Rs.550/- HALF KG BIRYANI 2 25


020 Rs.450/- 2 & 100gms ROTI & CURRY 3 36
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

After converting into tables or Relational model we need


to enter the data into system using SQL commands. Later we
work on system using oracle.
The process of reducing data redundancy in a relational
database is called Normalisation. Normalisation is done to achieve
the following 4 goals.
•Arranging data into logical grouping such that each group describes
a small part of the whole.
•Minimizing the amount of duplicate data called redundancy stored
in a database.
•Organising the data such that when you modify it you can make the
changes only in one place.
ADVANTAGES:-
•Building database in which you can access and manipulate the data
•It frees the database from certain insertion,updation and deletion
quickly and efficiently without compromising the integrity of data in
anomalies.
•storage.
It reduces the need to restructure the database as new kinds of data are
introduced.
•It makes the database more informative to users,including different uses
making different querries.
•It avoids the database design in favour of certain queries at the expense
of others.
•It allows the operation needed for data access to be simpler than they
would be.
Now we are normalizing the tables to obtain tables without redundancy.We
should convert the tables into BCNF/3.5NF(Boycee Codd Normal Form).This
is called normalization.
TABLE FOR RESTAURANT:-

Name Ph.no Address


MARRIOTT 040-27976816 HYDERABAD

HOTEL VICEROY 040-66595754 BANGLORE

TAJ MAHAL 0891-66432342 MUMBAI

SHAN BAGH 9822882221 DELHI

RIVERSIDE 040-66762361 GOA

In the above table the attribute Ph No. gives Address and


Name ,that is Ph No. acts as candidate key and remaining all
non-key attributes completely depend on key attribute.The
above table is already in BCNF so need to normalize again.
FUNCTIONAL DEPENDENCY:-
Ph.noName,Address.
TABLE FOR CASHER:-
BILL No. NAME
122321 ANUDEEP SINGH
133221 SANDEEP
144331 VIKRAM
155442 RAHUL
166221 GAUTAM

In the above table the attribute BillNo. Serves as


candidate key and the non-key attribute(Name) is
dependant on key attribute. Therefore the table is
already in BCNF.
FUNCTIONAL DEPENDANCY:-
Bill No.-->NAME
TABLE FOR MANAGER:-
MANAGER ID No. NAME
1231 VIJAY RATHOD
1332 ANUP RUBENS
1443 SURYA SETH
1554 AJAY YADAV
1665 SUKESH REDDY

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

have atomic values.In PhoneNo. there are two values therefore to


make it in 1NF both the values should be placed in different rows.
After normalization the table is:-

TABLE FOR CUSTOMER:-


CUSTOMER NAME PHONE No. ADDRESS
ID
111 MAYANK 9989899121 PARADISE
111 MAYANK 9911111111 PARADISE
222 KRISHNA 7842784212 BANNERGHUTTA
333 VENKAT 8989858512 AZAD ROAD
444 HASINI 994949122 AGRA
555 SUJANA 998288282 BAGA

The above table is normalized and it satisfies 1NF


TABLE FOR CHEF:-
NAME CHEF ID No.
BHAGAT SINGH AA23
HITHESH REDDY A123
SUHAS NAIDU BB22
NAYEEM B123
SAHITHI C112

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 AB
Bc
thenAC
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/-

The above table is in BCNF because the attribute OrderNo. acts as


key attribute and No.of items acts as non-key attribute.Here
nonkey attribute depends on key attribute.Therefore we can say
that the table is in BCNF.
FUNCTIONAL DEPENDENCY:-
OrderNo.-->No.of items
Creating table and inserting values into restaurant:-
• Creating table and inserting values into cashier:-
Objective:
1) Creation of Triggers
2) Implementing Triggers: Create a transparent audit system for a table
restaurant.The system must keep track of the records that are being deleted.The
functionality being when a record is deleted the original record details and the
date of operation are stored in the audit table then delete is allowed to go
through.
Explanation: Here we have created a trigger on restaurant table . our aim is to
keep track of records on restaurant table so that if any delete operation is fired
on restaurant then our restaurant_audit table will be updated with the
information that which record is deleted, who deleted it and on what date it
was deleted.
We have restaurant table:
SELECT * FROM restaurant;
OUTPUT :

2)Creation of audit_restaurant:

create table restaurant_audit( R_name varchar2(15),R_phoneno


varchar2(15),R_address varchar2(15),deletedate varchar2(10),
deletedby varchar2(10));
select * from restaurant _audit table;
3)Creation of triggers:
CREATE OR REPLACE TRIGGER
restaurant_before_delete
BEFORE DELETE
ON restaurant
FOR EACH ROW
DECLARE
v_username varchar2(10);

BEGIN

-- Find username of person performing the DELETE on


the table
SELECT user INTO v_username
FROM dual;

-- Insert record into audit table


INSERT INTO restaurant_audit
( R_name,
R_phoneno,
R_address,
deletedate,
deletedby )
VALUES
( :old.R_name,
:old.R_phoneno,
:old.R_address,
sysdate,
v_username );
END;
Output :

4) Execution :
A)SELECT * FROM restaurant;

B)delete from restaurant where


R_name='MARRIOTT';
C)SELECT * FROM restaurant;

D)SELECT * FROM restaurant_audit;


Specification:
We work on Oracle 10g
HardDisk

Applications:-

1) This restaurant database management system is useful in retrieving ,


storing and deleting data easily without any problem of redundancy and
inconsistency.
2) The data can be accessed easily.It can store large amount of data
without any confusion and repetition.
3) The concept of database management is not only used in restaurant
management sytem but also in various systems like Hospital
management system,University management system, Library
management system etc.

You might also like