My name is Brian and I'm in the process of modeling a database for an on-line deli application. To give you a little background I've identified four entities in this real-world model. They are:
In the creation of my logical schema I've been following a method from the authors 'elmasri and navathe' in their publication 'fundamentals of database systems'. In a chapter titled 'enhanced entity-relationship and object modeling' they talk about superclasses and subclasses. In my application an 'order' can have multiple 'selections'. ‘selection’ is a superclass and I’ve generalized 'selection' into the following subclasses:
Note For the purpose of doing business (specifically, 'ordering' these items) I don't need to specify any specific attributes for the subclass's (chip, dessert, beverage...) with the exception of ‘sandwich’ and ‘salad’.
that have (bread_id, meat_id, size and dressing). My question is "Can you have a subclass with no specific attributes other than those that are defined in the superclass?"
In the event that it helps I will put some data to these entities.
it was said that EER concepts don't manifest themseleves very often in the real world, though they do occur. Given that it was sugggested that I make things a bit simpler and go off the premise that:
CUSTOMER orders FOOD
FOOD makes up ORDER
Order gets DELIVERY.
Those would be my relations and as such my starting point.
But Food presents a problem When you start tossing such complex objects like "box lunch" which contains food items into an entity FOOD.
There is additional complexity with entities like "sandwich" which contains attributes like "meat, bread and size" in addition to all the other the common food attributes like (description, price and qty).
For better or worse this is why I started generalizing on "food". Please advise if you have the time I really could use the help. thx Brian