In: Computer Science
Design and implement a database for restaurant
At the end you will submit a report that has the following:
1-Describe the scenario of your database, what does it include, and what are the assumptions you have.
2-Draw an Entity-Relationship Diagram (ERD)
3-Write the schemas for 2 entities and 2 relationships
4- Compose two or three possible queries in written English and SQL that you can get from the database.
please l need the answer for this assignment.
Ans:1 It Describe follow scenario for restaurant Database
1. Restaurant(Name, Contact_no, Address)
2. Manager(Name, Contact_no,id_no)
3. Order(Order_no, No_of_items)
4. Cheff(Number, id_no)
5. Item(item_no, Description, Price, Quality)
6. Waiter(Name, Id_no)
7. Customer(Name, Address, Contact_no, Customer_id)
8. Bill(Bill_no, Price, Order_detail)
9. Cashier(Id_no, Name)
Ans:2 ER diagram for Restaurant
Ans:3 Schema for Entity and Relationship
Entity:
they define multivalue attribute,they describe other entity and often have one to many relation.
Customer(Customer_id, Name, Address, Contact_no)
Bill(Bill_no, Price, Order_detail)
Relationship:
Relation is away that hold table(Schema) together, They are used to connect related info between table.
Relation strength is base on how the primary key of related entity is define.
Customer(Customer_id, Name, Address, Contact_no)
Order(Order_no, No_of_items)
Ans:4 Below are some query regarding restaurant database
1. SELECT Name FROM Customer LIMIT 5;
2. SELECT Order_no FROM Order WHERE No_of_item > 5;
3. SELECT Bill_no FROM Bill WHERE Price > 1000: