Download presentation
Presentation is loading. Please wait.
Published byMaximilian West Modified over 9 years ago
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.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.