Professional Documents
Culture Documents
ENTITY RELATIONSHIP
DIAGRAM
PART 1
ARDI NUGRAHA, BCS, MIT
Data
Modeling
with !
ERD
Relationship
Objectives
components
Data
Modeling
with !
ERD
Relationship
ERD
STUDENT
STUDENT_ID
STUDENT_NAME
STUDENT_ADDRESS
STUDENT_ID
B03139289
ZAINAB
B03182781
MARIAM
TAMAN KEMBOJA, KL
B03167281
SHIKIN
B03123222
AHMAD
TAMAN AMAN , JB
STUDENT_NAME
STUDENT_ADDRESS
Data
Modeling
with !
ERD
Relationship
ERD
Data
Modeling
with !
ERD
MODEL
ENTITIES
&
ATTRIBUTES
ERD
STEP by STEP
CHOOSE PK
MODEL
DETERMINE
RELATIONSHIP CARDINALITIES
CHECK THE
MODEL
Data
Modeling
with !
ERD
ERD
Entity
Data
Modeling
with !
ERD
ERD
Entity
STUDENT_NAME
STUDENT_ADDRESS
B03139289
ZAINAB
B03182781
MARIAM
TAMAN KEMBOJA, KL
B03167281
SHIKIN
AHMAD
TAMAN AMAN , JB
B03123222
Data
Modeling
with !
ERD
ERD
Attributes
Characteristics of entities
Chen notation: attributes represented by ovals
connected to entity rectangle with a line
- Each oval contains the name of attribute it
represents
Data
Modeling
with !
ERD
ERD
Model
Data
Modeling
with !
ERD
ERD
Attribute
Data
Modeling
with !
ERD
ERD
Attribute
HOUSE_NUMBER
ADDRESS
ROAD NAME
POSTCODE
HOUSE_NUMBER
POSTCODE
345
234
333
Data
Modeling
with !
ERD
ERD
Attribute
10
2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from the U.S. Edition.
May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Data
Modeling
with !
ERD
ERD
Attribute
Data
Modeling
with !
ERD
ERD
Attribute
Data
Modeling
with !
ERD
ERD
Keys
UNIQUE VALUES
NO CHANGE OVER TIME
PREFERABLY SINGLE ATTRIBUTE
Data
Modeling
with !
ERD
ERD
Keys
Data
Modeling
with !
ERD
ERD
Entity and Attribute
Data
Modeling
with !
ERD
ERD
Connectivity and Cardinality
Data
Modeling
with !
ERD
ERD
Connectivity and Cardinality
Data
Modeling
with !
ERD
ERD
Connectivity and Cardinality
Connectivity
- Describes the relationship classification
Cardinality
- Expresses minimum and maximum number of entity
occurrences associated with one occurrence of
related entity
Data
Modeling
with !
ERD
ERD
Connectivity and Cardinality
Reading Modality and Cardinality
Data
Modeling
with !
ERD
ERD
Connectivity and Cardinality
Data
Modeling
with !
ERD
ERD
MAX CARDINALITY
(CONNECTIVITIES)
purchase
(1,1)
(1,4)
(CARDINALITIES)
15
Data
Modeling
with !
ERD
ERD
Existence Dependence
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
16
Data
Modeling
with !
ERD
ERD
Associative (Composite) Entities
13
Data
Modeling
with !
ERD
ERD
Associative (Composite) Entities
14
Data
Modeling
with !
ERD
ERD
Associative (Composite) Entities
To create a relationship, a "child" entity must inherit the primary key of a "parent" entity.
However, in a many-to-many relationship, neither entity is the "parent" or the "child"; the
relationship is "unresolved".
EMP
handle/handled by
PRO
EMPLOYEE_NAME
PROJECT_ID_1
PROJECT_ID_2
PROJECT_ID_3
E1
P10
P13
P11
E2
E3
P10
E4
P12
PROJECT
P13
P11
PROJECT_ID
PROJECT_NAME
EMPLOYEE_ID_1 EMPLOYEE_ID_2
P10
AB
E1
E3
P11
JS
E1
E3
P12
KL
E4
P13
YU
E1
E2
Data
Modeling
with !
ERD
ERD
Associative (Composite) Entities
SUMMARY
Entity relationship (ER) model
- Uses ERD to represent conceptual database as viewed
by end user
- ERMs main components:
Entities
Relationships
Attributes