Presentation is loading. Please wait.

Presentation is loading. Please wait.

Entity / Relationship Diagrams Objects entities Classes entity sets Attributes are like in ODL. Relationships: like in ODL except - not associated with.

Similar presentations


Presentation on theme: "Entity / Relationship Diagrams Objects entities Classes entity sets Attributes are like in ODL. Relationships: like in ODL except - not associated with."— Presentation transcript:

1 Entity / Relationship Diagrams Objects entities Classes entity sets Attributes are like in ODL. Relationships: like in ODL except - not associated with classes (I.e., first class citizens) - not necessarily binary Product address buys

2 address namessn Person buys makes employs Company Product namecategory stockprice name price

3 Multi-way Relationships Purchase How do we model a purchase relationship between buyers, products and stores? Product Person Store

4 Roles in Relationships Purchase What if we need an entity set twice in one relationship? Product Person Store salesperson buyer

5 Roles in Relationships Purchase Product Person Store salesperson buyer Note the multiplicity of the relationships: we cannot express all possibilities

6 Attributes on Relationships Purchase Product Person Store date

7 Design Principles Purchase Product Person What’s wrong? President PersonCountry Moral: be faithful!

8 What’s Wrong? Purchase Product Store date person personAddr Moral: don’t talk too much.

9 What’s Wrong? Purchase Product Person Store date Dates Moral: don’t complicate life more than it already is.

10 Do we really need 3-way relationships? Purchase Person Store Product StoreOf ProductOf BuyerOf Moral: Find a nice way to say things.


Download ppt "Entity / Relationship Diagrams Objects entities Classes entity sets Attributes are like in ODL. Relationships: like in ODL except - not associated with."

Similar presentations


Ads by Google