Connecting Tech Pros Worldwide Help | Site Map

restaurant database

hadi
Guest
 
Posts: n/a
#1: Mar 15 '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 food is 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.

ZeldorBlat
Guest
 
Posts: n/a
#2: Mar 15 '07

re: restaurant database


On Mar 15, 10:39 am, "hadi" <hadishir...@gmail.comwrote:
Quote:
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 food is 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.
How about something like this:

create table order (
orderID,
orderDate,
EmployeeID
)

create table dineInOrder (
orderID
/* Maybe some other things */
)

create table carryOutOrder (
orderID,
customerID
)

create table customer (
customerID,
surname,
telephone,
address
)

Closed Thread