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

Microproject Dbms

its an DBMS microproject and the topic is restaurant management system
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
12 views

Microproject Dbms

its an DBMS microproject and the topic is restaurant management system
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 28
IDENTIFICATION OF ATTRIBUTES FOR RESTAURANT :- 1) Name 2) Ph.no 3) Address IDENTIFICATION OF ATTRIBUTES FOR CASHER:- 1) Bill no. yam Tul) IDENTIFICATION OF ATTRIBUTES FOR BILL:- 1) Order Detail 2) Bill no. 3) Amount IDENTIFICATION OF ATTRIBUTES FOR MANAGER:- 1) Manager idno. aaa Objective of the project: ‘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. IDENTIFICAT! y 'S FOR CUSTOMER:- Neri, 2) Phone no. RPG elas) EO R@nscontom (el IDENTIFICATION OF ATTRIBUTES FOR CH SOE riites PATO smb ite) IDENTIFICATION OF ATTRIBURES FOR WAITER:- SB BNET 2) Id no. IDENTIFICATION OF ATTRIBUTES FOR ITE! Dior bion PPC tis 3) Quantity CO Deon sleet pI NENT Tew e F ATTRIBUTES FO! DONO ey 2) Order no. CNN ae Mom MUL) ota ed - Adatabase 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 VS IDENTIFICATION OF ENTITIES , ATTRIBUTES AD RELATIONS RELATED TO RESTAURANT MANGEMENT SYSTEM. IDENTIFICATION OF ENTITIES:- Deer TitG va Or Silay SD esi CW ET u ens OnoT (Ce toa 7) Waiter Deca elroy RELATIONAL MODEL TABLE FOR RESTAURANT:- Ph.no (040-27976816 040-66595754 HYDERABAD. BANGLORE 0891-66432342 MUMBAI 9822882221 DELHI GOA ANUDEEP SINGH SANDEEP. VIKRAM, RAHUL GAUTAM Naira tela) 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 Leen TABLE FOR WAITER ae enka el) TABLE FOR CUSTOMER:- roar Py MAYANK 9989899121,9911111 PARADISE 111 VENKAT. 8989858512 AZAD ROAD HASINI 994949122 AGRA => KRISHNA 7842784212 BANNERGHUTTA i a IE SUJANA 998288282 BAGA, OR CH CHEF ID No. Implementation:- *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. CYC sa 17008 eC ROTI & CURRY fora Lila y a= 8 fe) UA \cl elt Se 122321 133221 144331 155442 166221 WAY RATHOD ANUP RUBENS SURYA SETH AJAY YADAV SUKESH REDDY Rs.550/- Rs.450/- Rs.250/- Rs.300/- Rs.200/- TABLE FOR CASHER:- ee Cs ANUDEEP SINGH ‘SANDEEP VIKRAM. RAHUL GAUTAM In the above table the attribute BilINo. 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 Rs.550/- Rs.450/- Rs.250/- Rs.300/- Rs.200/- HALF KG 2 & 100gms 250 gms 200 gms 150 gms Pelt) te BIRYANI ROTI & CURRY MANCHURIA CHOUPSEY FINGER CHIPS 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. ORDER DETAIL Ea 122321 Rs.550/- 133221 Rs.450/- 144331 Rs.250/- 155442 Rs,300/- 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 apr] gle] 9)(- MoMA =1 01) La FUNCTIONAL DEPENDENCY:- OrderNo.-->No.of items 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 Vic l0\Va FUNCTIONAL DEPENDANC Miestsim au el: M0] tte Rs.550/- HALF KG BIRYANI Rs.450/- 2 & ROTI & CURRY 100gms Rs.250/- 250 gms MANCHURIA Rs.300/- 200 gms CHOUPSEY Rs.200/-150gms_FINGER CHIPS The above table is not in 3NF because there exists transitivity . FUNCTIONAL DEPENDENCY:- OrderNo.-->No. of items,Description,|temNo. ItemNo.-->Amount,Qunatity,Description. OrderNo.-->Description The transitivity is of the form:- is a=) eas ANT -1t) eA TABLE FOR CHEF:- Cee H AA23 fi ese A123 BB22 B123 7 Ls c1i2 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:- ChefldNo.-->Name TABLE FOR WAITE GIRISH GOUD DATABASE TRRIGERS Loy tenes 1) Creation of Triggers ocean erence chore ett mam cn eer restaurant. The system must keep track of the records that are being deleted. The Mh ace Cee kicertnh heck ecn seach Ere Meuse eect BTM E erties CesT RCo Clem SEE haces Ce Picea Explanation: Here we have created a trigger on restaurant table . our aim i: 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 STN CouTLeCO UME Co ese R Re (ole toe Maye de Co (ace CecTe ROMA Tm CCS SESE (o [ae Co ence cesT UL) Cog * Creating table and inserting values into cashier:- FAutocormit Display [10 Resume Explain Describe Saved SOL tistory cunimo —c mame 5 rows returned in 0.00 seconds Specification: ACR oot ace esr-coleom Liye HardDisk Applications:- Teer er Ren enn cnc R nee CSN RECs Sour rear TiC Meld annem LMS NRO TCODT LAE TEN COLD) on Mey CeCe Lecce Tiere SS Cort oA 2) The data can be accessed easily. It can store large amount of data without any confusion and repetition. BW Urea RU Rel Cee on nme OMe Nao BT MReIUctiTg PEER MMT on Meee On CTE NaS nM Tests ETN management system,University management system, Library UE n Tone ea COTTA rrscr ce rrerace cesesre coer qursnrs verore deters SELECT user INTO vusernane bY) neasin 2 atin! —_Sortomne_nuanunars A)SELECT * FROM restaurant; HOTELVICEROY —080.00080798 —_ BANOLOKE, SHANBAGH ceazse2221 4 rows returned in 0.00 seconde sec EHR Te 3)Creation of triggers: CREATE OR REPLACE TRIGGER ee oe ced PYRO OLD ON restaurant PreeorCe no DKW Rare) BEGIN ~ Find username of person performing the DELETE on re Soak cs Ona CL To tr Se eee eee ad NOW en ote La as paca Paes Come deletedby ) SVR) (cold.R_name, POOR BOCRaet Pres See END; SoA e maa ON MCCUE OUTPUT: RWAME — RPHONENO —R_ADDRESS SHANEAGH eez2ee2221 DELHI 4 rows returned in 0.00 seconds 2)Creation of audit_restaurant: errr pene aU Osean CR CTS Te) RSM etc MCD nC nee Cem ncar ne eel deletedby varchar2(10)); Percea conn etme trary Results Explain Desciibe Saved Sal History 19 data found (NSO O Os sD CO Mcgee Te R_NAME R_PHONENO HOTELWICEROY 040-68595754 TAJMAHAL 0801-66432342 SHANBAGH 99822882221 ‘3 rows returned in 0.00 seconds D)SELECT * FROM restaurant_audit; R_NAME R_PHONENO R_ADDRESS MARRIOTT 040-27078916 HYDERABAD 1 rows returned in 0.00 seconds R_ADDRESS BANGLORE MUMBA! DELHI DELETEDATE DELETEDBY 20-MAR- 15, ANONYMOUS ABLE FOR CUSTOMER: MAYANK. 9989899121,9911111 PARADISE 111 nett KRISHNA 7842784212 BANNERGHUTTA EE Ma =VENKAT 8989858512 (CE HASINI 994949122 (55$¢ (SS9BE) 26292 5G: every cell should 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:- MAYANK 9989899121 PARADISE MAYANK 9911111111 PARADISE KRISHNA 7842784212 BANNERGHUTTA VENKAT 8989858512 AZAD ROAD HASINI 994949122 AGRA SUJANA 998288282 BAGA he above table is normalized and it satisfies 1NF Here A is OrderNo.,B is ItemNo and C is Description.To avoid this condition we Pee RR Le earl) aceon edna litem ey caCORE BSN TABLE FOR eS Dyan Rs.550/- HALF KG BIRYANI Rs.450/- 2 & 100gms ROTI & CURRY Rs.250/- 250 gms MANCHURIA Rs.300/- 200 gms CHOUPSEY Rs.200/- 150 gms FINGER CHIPS Now the table for item is in BCNF because the attribute ITEMNo. ac and all the remaing non-key attributes are dependent on key attribute. FUNCTIONAL DEPENDENC ITEMNo.-->Amount, Quantity, Descripti DDL COMMANDS Creating table and inserting values into restaurant:- Address HYDERABAD 040-66595754 BANGLORE 0891-66432342 MUMBAI 9822882221 DELHI 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 MANAGER:- Dla VIAY RATHOD ANUP RUBENS. SURYA SETH AJAY YADAV 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: 7 122321 Rs.550/- 133221 Rs.450/- 144331 Rs.250/- rad 155442 Rs.300]- Pret Re 166221 Rs.200/- In the above table the attribute BilINo. 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. RELATIONS:- 1) Restaurant HAS Manager 2) Restaurant HAS Casher RPP OU DR ORecitoe 4) Manager TELLS Chef 5) Manager TAKES Order OTS one awe neon 7) Customer PAYS Bill 8) Waiter BRINGS Order 9) Waiter DELIVERS TO Customer 10)Chef PREPARES Order 11)Order CONTAINS Item

You might also like