Entity / Relationship DiagramsMulti-way RelationshipsRoles in RelationshipsSlide 5Attributes on RelationshipsDesign PrinciplesWhat’s Wrong?Slide 9Do we really need 3-way relationships?Entity / Relationship DiagramsObjects entitiesClasses entity setsAttributes are like in ODL.Relationships: like in ODL except - not associated with classes (I.e., first class citizens) - not necessarily binaryProductaddressbuysaddressname ssnPersonbuysmakesemploysCompanyProductname categorystockpricenamepriceMulti-way RelationshipsPurchaseHow do we model a purchase relationship between buyers,products and stores?ProductPersonStoreRoles in RelationshipsPurchaseWhat if we need an entity set twice in one relationship?ProductPersonStoresalespersonbuyerRoles in RelationshipsPurchaseProductPersonStoresalespersonbuyerNote the multiplicity of the relationships: we cannot express all possibilitiesAttributes on RelationshipsPurchaseProductPersonStoredateDesign PrinciplesPurchaseProductPersonWhat’s wrong?PresidentPersonCountryMoral: be faithful!What’s Wrong?PurchaseProductStoredatepersonpersonAddrMoral: don’t talk too much.What’s Wrong?PurchaseProductPersonStoredateDatesMoral: don’t complicate life more than it already is.Do we really need 3-way relationships?PurchasePersonStoreProductStoreOfProductOfBuyerOfMoral: Find a nice way to say
View Full Document