Ais275 CHP 4 - Erm
Ais275 CHP 4 - Erm
ENTITY
RELATIONSHIP
(ER)
MODELLING PREPARED BY:
DR MARJAN BINTI MOHD NOOR
LEARNING On completion of this chapter,
you should be able to:
OBJECTIVES
• The main characteristics of entity relationship components
CHEN
NOTATION CROW’S FOOT
Attributes represented by NOTATION
CHARACTERISTICS ovals connected to entity
Attributes written
OF ENTITIES rectangle with a line.
in attribute box
Each oval contains the
name of attribute it below entity
represents rectangle
REQUIRED ATTRIBUTES COMPOSITE
IDENTIFIERS
ATTRIBUTES (continued)
Primary key
Must have a composed of
value more than one
1 attribute 5
IDENTIFIERS
OPTIONAL
ATTRIBUTES DOMAIN One @ more
attributes that
May be left Set of
uniquely identify
empty possible
each entity
values for an
instance
attribute
2 4
3
Before
deleting
After
deleting
ATTRIBUTES
(continued)
Single-value
attribute
Composite Simple can have only a Multivalued
attribute attribute single value attributes
Exm; age
can be cannot be (simple), serial can have many
subdivided subdivided number values
(composite)
SE-08-02-189935
ATTRIBUTES
(continued)
• Cardinality
• Expresses minimum and maximum number of entity
occurrences associated with one occurrence of
related entity
CARDINALITY
(1,N)?
• Existence dependence
• Entity exists in database only when it is associated with
another related entity occurrence
• Existence independence
• Entity can exist apart from one or more related entities
• Sometimes such an entity is referred to as a strong or
regular entity
Relationship Strength
• Weak (non-identifying) relationships
• Exists if PK of related entity does not contain PK component of parent
entity
• Optional participation
• One entity occurrence does not require
corresponding entity occurrence in particular
relationship
• Mandatory participation
• One entity occurrence requires corresponding entity
occurrence in particular relationship
Relationship Degree
Indicates number of entities or participants
associated with a relationship
• Unary relationship
• Association is maintained within single entity
• Binary relationship
• Two entities are associated
• Ternary relationship
• Three entities are associated
Recursive Relationships
• Relationship can exist between occurrences of the same
entity set
• Naturally found within unary relationship
Associative (Composite) Entities