Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
34 views28 pages

DBMS Microproject

its an dbms microproject based on 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 or read online on Scribd
0% found this document useful (0 votes)
34 views28 pages

DBMS Microproject

its an dbms microproject based on 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 or read online on Scribd
You are on page 1/ 28
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. Relevance to the Subject: + Adatabase management system is system software for creating and managing databases. The DBMS provides the grammers with a systematic way to ,update and manage data. An restaurant have many entities and every ny ‘many attributes. By identifying the entities s and relations in the restaurant management system flat olin etm one OR NCR Ron ann - 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 CR IDENTIFICATION OF ENTITIES , ATTRIBUTES AND ELATIONS ESTAURANT MANGEMENT 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 Pant ate Saul is IDENTIFICATION OF ATTRIBUTES FOR MANAGER:- sO rll leis Late yaa tliat -3 IDENTIFICATION OF ATTRIBUTES FOR CUSTOMER:- 1) Name 2) Phone no. RDP) CUS niomll IDENTIFICATION OF ATTRIBUTES FOR CHEF:- SDN Ents 2) Chef id.no IDENTIFICATION OF ATTRIBURES FOR WAITER:- DPN rite eae Bion IDENTIFICATION OF ATTRIBUTES FOR ITEM:- cnt 2) Amount 3) Quantity COB PSone) IDENTIFICATION OF ATTRIBUTES FOR ORDER:- DNC icons 2) Order 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. RELATIONAL MODEL 040-27976816 HYDERABAD. 040.66595754 BANGLORE 0891-66432342 MUMBAI 9822862221 DELHI 040-66762361 GOA TABLE FOR CASHER:- ANUDEEP SINGH SANDEEP VIKRAM RAHUL GAUTAM Rs.550/- Rs.450/ Rs.250/- Rs.300/ Rs.200/- 122321 13: 144331 155442 166221 f DUET oe VAY RATHOD ANUP RUBENS SURYA SETH ‘NAY YADAV SUKESH REDDY aPNe} ee) el MAYANK KRISHNA VENKAT HASINI SUJANA 9989899121,9911111 111 7842784212 e9e98sesi2 994949122 998288282 PARADISE BANNERGHUTTA, AZAD ROAD AGRA BAGA TABLE FOR ORDER:- Rs,550/ HALF KG BIRYANI 2 Rs,450/ 2&100gms ROT! & CURRY 3 36 Rs.250/ 250 gms MANCHURIA 4 44 Rs. 300/ 200 gms CHOUPSEY i Rs,200/ 150 gms FINGER CHIPS 2 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. TABLE FOR RESTAURANT:- 040-27976816 HYDERABAD 040-66595754 BANGLORE 0891-66432342 MUMBA 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 CASHER:- 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 TABLE FOR MANAGER:- Dc DT ee VAY 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:- ORDER DETAIL CSS Ts 1554 Partha ioe Lao .eenld 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. TABLE FOR CUSTOMER:- MAYANK 9989899121,9911111 PARADISE 1 KRISHNA, 7842784212 BANNERGHUTTA VENKAT 8989858512 AZAD ROAD 994949122 AGRA 9 B every cell should have atomic values.in PhoneNo. there are two values therefore to make it in INF 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 ine above table is normalized and it satisfies 1NF TABLE FOR CHEF:- 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 WAITER:- out LN Cony In the above table the Waiter IdNo. gives Name of the Wao Adar laa la} 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 Ellcctloh ae FUNCTIONAL DEPENDANCY:- WRBEE PUR ORUER HALF KG: BIRYANI 2 2& ROTI & CURRY 3 36 100gms 250 gms MANCHURIA 4 44 200 gms CHOUPSEY 2 Rs200. 150 gms___ FINGER CHIPS 2 The above table is not in 3NF because there exists rer TaN FUNCTIONAL DEPENDENCY:- OrderNo.-->No. of items,Description,ItemNo. ItemNo.-->Amount,Qunatity,Description. OrderNo.-->Description BUatom ae lacie 9 alee alee) gnabed is ea: ) Ae eal lay ees 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 nS HALF KG BIRYANI 2 & 100gms ROTI & CURRY 250 gms MANCHURIA 200 gms CHOUPSEY 150 gms FINGER CHIPS DOR U Tas mu Se ce AULT LCR NE Se Se ULC a BUEN MU nce ena i camecTUbsl ele ede code Co ce (nT Renn CaN aT TC FUNCTIONAL DEPENDENCY:- ITEMNo.-->Amount,Quantity,Description 166221 The above table is in BCNF because the attribute OrderNo. acts as CCNA Leeg sl 1CE Ue BN (Ros eee lec MT at CNA Teag 0 CMa [ote nonkey attribute depends on key attribute.Therefore we can say that the table is in BCNF. FUNCTIONAL DEPENDENCY:- OrderNo.-->No.of items | DDL COMMANDS Creating table and inserting values into restaurant:- * Creating table and inserting values into cashier:- DATABASE TRRIGERS RO ay Rem Mara 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 SDT Agron m ease Brae (aa coe Rien Bcomeee Re aeT Sec RT -date of operation are stored in the audit table then delete is allowed to go ee POSTED Ye sec al Neer oe ERLE OU eT RD ‘keep track of records on restaurant table so that if any delete operation is fired RO e aes rcCUe nmet eal nT Mm ee Oma LT POETIC MELE mae cosn Ee (ete My OR occ RRO Eero Ra ace Me mel cs ECT * FROM restaurant; eu create table restaurant_audit( R_name varchar2(15),R_phoneno Sere Oe) Rare Rr eee RRS Cra oe eel deletedby varchar2(10)); Poem Rec UU Mme CRE (ord Resuts Expiam Desciibe Saved Sal Hreto dats found | 4) Execution : fe avoness A)SELECT * FROM ‘restaurant; ROR me Oe Hm LaEs R_name="MARRIOTT’; feito Mae uO) R_HAME R_PHONENO —R_ADDRESS HOTELVICERDY 04065595754 BANGLORE TAIMAHAL 0801.65432342 MUMBAI SHANBAGH 9822882221 DELHI 3 rows returned in 0.00 seconds Dooce eae Ome Cc meres RNAME R_PHONENO R_ADDRESS DELETEDATE OELETEDBY MARRIOTT 040-270789168 HYDERABAD — S0-MAR-45. ANONYMOUS 1 rows returned in 0.00 seconds F RSylee rite We work on Oracle 10g SETI Bye Pe) ecto SONU SSCs eUne Wm clon Un ee Cn Ta Toa rman Rta neki eRe INmCn TOT m een Cone t Ttement STOIC 2) The Fae Pop trecc cine Ia ena er TORO m Tey STU CeTHae UNA TETSTO eCUCe ce] te LEO SI WU roi cs ROM Cc Uu ee ee ha CORT RCE Pen eT ROR COTE ena EL Cm gO LN SOUS A MMOL ACES DLE on eect LL PTET een alte

You might also like