vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. |
| ||||
| 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 ) |