Professional Documents
Culture Documents
Management
ER MODELING AND
RELATIONSHIP SCHEMA
Introduction to Entity-Relationship (E-R) Modeling
Relationships
Cardinalities in Relationships
Conceptual Data Modeling and the E-R Model
Logical Design
Data Modeling
Data Modeling Notations:
Binary relationships
FIGURE 8-11
Examples of relationships of different
Ternary relationships degrees
13
Data Modeling
Data Modeling is a creative, dynamic and evolving
process for:
◦ Exploring the different ways that entities can
relate to each other as they would in the real
world
◦ Recording or drawing entities as they would
behave in a business environment
14
Data Modeling Notations:
A set of symbols used to
construct the ERD
There are many different
notations available but they
all communicate the same
idea
We will follow Barker’s
notation in this course
15
The Entity Relationship (E-R)
Model:
◦ Is a diagramming technique best known as ERD
◦ Is a series of Diagrams listing entities (with
attributes) and the relationships between
entities
◦ Is subject to many variations of representing
entities and relationships
16
The Entity Relationship (E-R)
Model:
An entity is drawn as a
rounded rectangle
Entity’s name appears singular - at
top - in capital letters
Entity’s attributes are
shown below its Name
The primary key attribute is
indicated by a solid underline
17
Relationships:
• The process of connecting any two entities in a
data model.
• The Associations between entities to enforce
Business Rules or Organizational Policies
• Different kinds:
◦ Binary relationships
◦ Unary relationships
◦ Ternary relationships
18
Binary Relationships
19
Relationships Types
▪ 1-1 (1:1)
▪ A single occurrence of one entity type can be associated with a
single occurrence of the other entity type and vice versa
▪ 1-M or M-1 (1:M, M:1)
▪ Use “Barker’s Notation” to represent the multiple association
▪ “many” = the maximum number of occurrences that can be
involved; means a number that can be: 1,2...N
▪ Sometimes the “M” can be represented by “N”
▪ M-N (M:N)
▪ “many” can be either an exact number or have a known
maximum
▪ Sometimes the “M” can be represented by “N”
20
C.Cardinality in Relationships:
21
Ordinality in Relationships
▪Ordinality ( = Modality = Optionality )
▪ The minimum number of entity occurrences that can be
involved in a relationship.
▪ “inner” symbol on E-R diagram
▪Mandatory relationship: each instance from an entity
must be related to another instance.
▪ Represented by a straight line
▪Optional Relationship each instance from an entity may be
related to another instance
▪ Represented by a dashed line
22
C.Cardinality and Ordinality in
Relationships:
▪ Ordinality is closely coupled with Cardinality.
▪ While Cardinality specifies the occurrences of a
relationship, Ordinality describes the relationship as
either mandatory or optional.
▪ Cardinality specifies the maximum number of
occurrences.
▪ Ordinality specifies the absolute minimum number of
occurrences.
▪ When the minimum number is zero, the relationship is
usually called optional and when the minimum
number is one or more, the relationship is usually
called mandatory.
23
Relationships: One to many
24
Relationships: many to many
25
C.Relationships: one to one –
in action:
26
Relationships Explained
27
References
1. Fundamentals of Database Systems, Seventh
Edition, Elmasri and Navathe(Copyright@ 2017)
2. Modern Systems Analysis and Design, Seventh
Edition. Jeffrey A. Hoffer Joey F. George Joseph
S. Valacich, Chap 8