Purchase Product Person Store Can still model as a mathematical set how 14 Q

Purchase product person store can still model as a

This preview shows page 13 - 30 out of 57 pages.

Purchase Product Person Store Can still model as a mathematical set (how ?)
Image of page 13
14 Q : what does the arrow mean? A : if I know the store, person, invoice, I know the movie too Rental VideoStore Person Movie Invoice Arrows in Multiway Relationships
Image of page 14
15 Q : what do these arrows mean? A : store, person, invoice determines movie and store, invoice, movie determines person Rental VideoStore Person Movie Invoice Arrows in Multiway Relationships
Image of page 15
16 Q : how do I say: “invoice determines store” ? A : no good way; best approximation: Later: generalize this to functional dependencies Rental VideoStore Person Movie Invoice Arrows in Multiway Relationships
Image of page 16
17 Roles in Relationships Purchase What if we need an entity set twice in one relationship? Product Person Store salesperson buyer Person
Image of page 17
18 Roles in Relationships Purchase What if we need an entity set twice in one relationship? Product Person Store salesperson buyer
Image of page 18
19 Attributes on Relationships Purchase Product Person Store date
Image of page 19
20 Converting Multiway Relationships to Binary Purchase Person Store Product StoreOf ProductOf BuyerOf date
Image of page 20
21 Relationships: Summary Modeled as a mathematical set Binary and multiway relationships Converting a multiway one into many binary ones Constraints on the degree of the relationship – many-one, one-one, many-many – limitations of arrows Attributes of relationships – not necessary, but useful
Image of page 21
22 Product name category price isa isa Educational Product Software Product Age Group platforms Subclasses in ER Diagrams
Image of page 22
23 .
Image of page 23
24 Subclasses in ER Diagrams Assume subclasses form a tree. – I.e., no multiple inheritance. Isa triangles indicate the subclass relationship. – Point to the superclass.
Image of page 24
25 Example Beers Ales isa name manf color
Image of page 25
26 ER Vs. Object Oriented Subclasses In the object-oriented world, objects are in one class only. – Subclasses inherit properties from superclasses. In contrast, E/R entities have components in all subclasses to which they belong. – Matters when we convert to relations.
Image of page 26
27 Example Beers Ales isa name manf color Pete’s Ale
Image of page 27
28 Constraints A constraint = an assertion about the database that must be true at all times Part of the database schema Very important in database design
Image of page 28
29 Modeling Constraints Finding constraints is part of the modeling process. Commonly used constraints: Keys: social security number uniquely identifies a person.
Image of page 29
Image of page 30

You've reached the end of your free preview.

Want to read all 57 pages?

  • Fall '14
  • Entity-relationship model, entity, Relational model, weak entity, Multiway Relationships

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture