Connecting Tech Pros Worldwide Forums | Help | Site Map

Restaurant Database

hadi
Guest
 
Posts: n/a
#1: Feb 27 '07
Imagine a restaurant which we want to store information about. Two
types of people are related to it.
1) People who simply call and the foods are delivered to them.
2) People who actually come to the restaurant and eat their food
there.
For both categories, order information(OrderID, OrderDate, EmployeeID)
is stored. But for the first category the customer
information(CustomerID, Sirname, Telephone, Address) is also stored.
Could any one help on how to draw the ER diagram for this database?
Thanks a lot.


ApexData@gmail.com
Guest
 
Posts: n/a
#2: Feb 27 '07

re: Restaurant Database


Imagine a restaurant which we want to store information about. Two
Quote:
types of people are related to it.
1) People who simply call and the foods are delivered to them.
2) People who actually come to the restaurant and eat their food
there.
For both categories, order information(OrderID, OrderDate, EmployeeID)
is stored. But for the first category the customer
information(CustomerID, Sirname, Telephone, Address) is also stored.
Could any one help on how to draw the ER diagram for this database?
I would have 3-Tables (EmployeeTable CustomerTable OrderTable). No pun
intended.
I would add the CustomerID field to the Order Table. Then link the
Employee and Customer Tables to the OrderTable as a one to many
relationship, and include Referential Integrity with CascadingUpdates.


Closed Thread