dbTalk Databases Forums  

restaurant database

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss restaurant database in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
hadi
 
Posts: n/a

Default restaurant database - 03-15-2007 , 08:39 AM






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.


Reply With Quote
  #2  
Old   
ZeldorBlat
 
Posts: n/a

Default Re: restaurant database - 03-15-2007 , 01:44 PM






On Mar 15, 10:39 am, "hadi" <hadishir... (AT) gmail (DOT) com> wrote:
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
)



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.