Unix Technical Forum

restaurant database

This is a discussion on restaurant database within the SQL Server forums, part of the Microsoft SQL Server category; --> Imagine a restaurant which we want to store information about. Two types of people are related to it. 1) ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-01-2008, 02:42 PM
hadi
 
Posts: n/a
Default restaurant database

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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-01-2008, 02:42 PM
ZeldorBlat
 
Posts: n/a
Default Re: restaurant database

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:17 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com