number Unary Binary Ternary Fig 2 2 Relationship Degree Example One entity

Number unary binary ternary fig 2 2 relationship

This preview shows page 50 - 66 out of 82 pages.

number Unary Binary Ternary
Image of page 50
Fig. 2-2: Relationship Degree Example One entity related to another of the same entity type Entities of two different types related to each other Entities of three different types related to each other Note the error here . . .
Image of page 51
My In-Class Example Skywalker’s Dogwalkers : Relationship degrees?
Image of page 52
Relationship Cardinality Ratios Tells only the _________number of entities of each type involved in this relationship For binary relationships One-to-One (or 1:1) » In each relationship instance , each entity will have exactly one related instance One-to-Many (or 1:M) » In each relationship instance , one entity will have a maximum of one related instance but an entity on the other side can have many related instances Many-to-Many (or M:N) » In each relationship instance , both entities can have many related entity instances maximum
Image of page 53
Fig 2-12a: Unary Relationships
Image of page 54
Fig. 2-12b: Binary Relationships
Image of page 55
Fig. 2-12c: Ternary Relationship Note the lack of a “natural” unique identifier Note: a relationship can have attributes of its own Also note: there are only three (not four) entities shown in this ER diagram. (only 3 named rectangles)
Image of page 56
My In-Class Example Skywalker’s Dogwalkers : Cardinality ratios?
Image of page 57
Relationship Cardinality Constraints Possible constraint values : 0, 1, M (many) Cardinality constraints: the number (value) of instances of one entity that could or must be associated with each instance of another entity in that relationship _________ cardinality constraint If zero, then it’s called optional If one or more, then it’s called mandatory _________cardinality constraint The maximum number possible » Not : the maximum that currently exists in the stored data Minimum Maximum
Image of page 58
Relationship Cardinality Constraints Shown on an ER Diagram
Image of page 59
Fig. 2-17a: Cardinality Constraints with mandatory minimum cardinalities
Image of page 60
Fig. 2-17b: Cardinality Constraints Two sets ( four total constraints ) of cardinality constraints are shown: (1, M) and (0, M) so this is a _____ order or ______ relationship An employee can be assigned to a minimum of zero projects and a maximum of many projects A project can be assigned to a minimum of one employee and a maximum of many employees
Image of page 61
Fig. 2-17c: Optional Cardinalities With: Unary degree, one-to-one relationship A person can be married to a minimum of zero persons and a maximum of one person
Image of page 62
Entities can be related to one another in more than one way Fig 2-21a: Entities with Multiple Relationships (1) Parse this diagram.
Image of page 63
My In-Class Example Skywalker’s Dogwalkers : Any sets of entities with multiple relationships between them?
Image of page 64
(min, max) Constraints Constraints that specify integer values for: the minimum and maximum number of entity instances that could possibly participate in a relationship once the database is in a “steady state” » That is, when the database is old enough to require purging of historical records that are no longer needed The (min, max) values more precisely identify the maximum number of participating entities than does the cardinality constraint of “ M Integer equivalent of is “0” Integer equivalent of is “1”
Image of page 65
Image of page 66

You've reached the end of your free preview.

Want to read all 82 pages?

  • Fall '17
  • Xi Li
  • Entity-relationship model, Skywalker

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes