Entity-Relationship Modeling: Pearson Education © 2014

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 26

Chapter 12.

Entity-Relationship Modeling

Pearson Education © 2014


Structural Constraints
Main type of constraint on relationships is
called multiplicity.
Multiplicity - number (or range) of
possible occurrences of an entity type that
may relate to a single occurrence of an
associated entity type through a
particular relationship.
Represents policies (called business rules)
established by user or company.
2
Pearson Education © 2014
Structural Constraints
The most common degree for
relationships is binary.
Binary relationships are generally
referred to as being:
one-to-one (1:1)
one-to-many (1:*)
many-to-many (*:*)

3
Pearson Education © 2014
Semantic net of Staff Manages
Branch relationship type

4
Pearson Education © 2014
Multiplicity of Staff Manages
Branch (1:1) relationship

5
Pearson Education © 2014
Semantic net of Staff Oversees
PropertyForRent relationship
type

6
Pearson Education © 2014
Multiplicity of Staff Oversees
PropertyForRent (1:*) relationship
type

7
Pearson Education © 2014
Semantic net of Newspaper
Advertises PropertyForRent
relationship type

8
Pearson Education © 2014
Multiplicity of Newspaper
Advertises PropertyForRent
(*:*) relationship

9
Pearson Education © 2014
Structural Constraints

Multiplicity for Complex Relationships


Number (or range) of possible occurrences
of an entity type in an n-ary relationship
when other (n-1) values are fixed.

10
Pearson Education © 2014
Semantic net of ternary Registers
relationship with values for Staff
and Branch entities fixed

11
Pearson Education © 2014
Multiplicity of ternary Registers
relationship

12
Pearson Education © 2014
Summary of multiplicity
constraints

13
Pearson Education © 2014
Structural Constraints
Multiplicity is made up of two types of
restrictions on relationships: cardinality
and participation.

14
Pearson Education © 2014
Structural Constraints

Cardinality
Describes maximum number of possible
relationship occurrences for an entity
participating in a given relationship type.
Participation
Determines whether all or only some entity
occurrences participate in a relationship.

15
Pearson Education © 2014
Multiplicity as cardinality and
participation constraints

16
Pearson Education © 2014
Problems with ER Models
Problems may arise when designing a
conceptual data model called connection
traps.
Often due to a misinterpretation of the
meaning of certain relationships.
Two main types of connection traps are
called fan traps and chasm traps.

17
Pearson Education © 2014
Problems with ER Models
Fan Trap
Where a model represents a relationship
between entity types, but pathway between
certain entity occurrences is ambiguous.

Chasm Trap
Where a model suggests the existence of a
relationship between entity types, but pathway
does not exist between certain entity
occurrences.

18
Pearson Education © 2014
An Example of a Fan Trap

19
Pearson Education © 2014
Semantic Net of ER Model with
Fan Trap

At which branch office does staff number SG37


work?

20
Pearson Education © 2014
Restructuring ER model to
remove Fan Trap

21
Pearson Education © 2014
Semantic Net of Restructured ER
Model with Fan Trap Removed

SG37 works at branch B003.


22
Pearson Education © 2014
An Example of a Chasm Trap

23
Pearson Education © 2014
Semantic Net of ER Model with
Chasm Trap

At which branch office is property PA14


available?

24
Pearson Education © 2014
ER Model restructured to remove
Chasm Trap

25
Pearson Education © 2014
Semantic Net of Restructured ER
Model with Chasm Trap
Removed

26
Pearson Education © 2014

You might also like