35bb38793e3391c2be8bab70a4c20fd9.ppt
- Количество слайдов: 10
Entity / Relationship Diagrams Objects Classes entities entity sets Attributes are like in ODL. Relationships: like in ODL except Product address buys - not associated with classes (I. e. , first class citizens) - not necessarily binary
name category name price makes Company Product stockprice buys employs Person address name ssn
Multi-way Relationships How do we model a purchase relationship between buyers, products and stores? Product Purchase Person Store
Roles in Relationships What if we need an entity set twice in one relationship? Product Purchase buyer salesperson Person Store
Roles in Relationships Product Note the multiplicity of the relationships: we cannot express all possibilities Purchase buyer salesperson Person Store
Attributes on Relationships date Product Purchase Person Store
Design Principles What’s wrong? Product Country Moral: be faithful! Purchase President Person
What’s Wrong? date Product Purchase Store Moral: don’t talk too much. person. Addr person
What’s Wrong? date Dates Product Purchase Moral: don’t complicate life more than it already is. Person Store
Do we really need 3 -way relationships? Product. Of Product Store. Of Store Buyer. Of Person Purchase Moral: Find a nice way to say things.
35bb38793e3391c2be8bab70a4c20fd9.ppt