Professional Documents
Culture Documents
1. 2.
Conceptual Logical Design 3.
Design e.g Relational Physical Design
e.g ER Model Model
3
ER Modeling
▪ One of the most difficult aspect of database
design is :
The fact that designers, programmers, and end-
user tend to view data and its use in different
ways
▪ To ensure that we get a precise understanding of
the nature of the data and how it is used by the
enterprise, we need a model for communication
that is non technical and free of ambiguities, the
Entity-Relationship (ER)model is one of
4
example.
ER Modeling (Cont.)
▪ ER Modeling is a top-down approach to database
design
□ Begin by identifying the important data
called entities and relationship between the
data that must be represented in the model
□ Then add some more details, such as:
▫ The information we want to hold about
the entities and relationship called
attributes
▫ Any constraint
5
Basic Concept of
ER Modeling
Basic Concept of ER Modeling
▪ Entities
▪ Relationship
▪ Attributes
▪ Identifier
▪ Multiplicity (cardinality and participation)
7
Entity
8
Attributes
▪ Entities have attributes that describe the entity’s
characteristics
▪ Example:
□ Attributes for Student entity:
▫ ID
▫ Name
▫ DoB
▫ Class
□ Attributes for Course entity :
▫ ID
▫ Course Name
9
Attributes(Cont.)
▪ Single-valued attribute : an attribute that holds a
single value for each occurrence of an entity
▪ Multi-valued attribute: an attribute that holds
multiple value for each occurrence of an entity,
example :
Degree of Relationship
13
Relationship (Cont.)
Example of Degree of Relationship
14
Multiplicity (cardinality ,
participation)
Cardinality
Participation
describe the maximum number of
possible relationship occurrence for determines whether all or only
an entity participating in a given some entity occurrences
relationship participate in a relationship. It
Menunjukkan jumlah maksimum appears on minimum values
entitas yang dapat berelasi dengan of the multiplicity
entitas pada himpunan entitas □ 0 (optional
yang lain participation)
- 1 to 1 (one to one) □ 1 (mandatory
- 1 to N (One to many) participation)
- M to N (Many to many)
15
Example : One-to-one binary
relationship
16
Example : One-to- many binary
relationship
17
Example : many-to- many binary
relationship
18
Example : One-to-one binary relationship with
participation (minimum cardinality)
19
Example : One-to-one binary relationship with
participation (minimum cardinality)
cardinality
One branch is managed by one one member of staff managed
member of staff one branch
participation 20
Weak Entity
▪ A weak entity is an entity that cannot exist in the
database without the existence on another entity
▪ For example, an employee’s dependents cannot
exist in a database without the employee existing
in the database
21
ID-Dependent Weak Entities
22
Weak Entity Identifier: ID-
Dependent
▪ An ID-dependent weak entity has a composite
identifier
□ The first part of the identifier is the identifier
for the strong entity
□ The second part of the identifier is the
identifier for the weak entity itself
23
Weak Entity Identifier: Non-ID-
dependent
24
Weak Entity Relationships
27
Diamond Notation (Chen)
28
Crow’s foot notation (Martin)
29
OMT-style notation (Rumbaugh)
30
31
32
Exercise
Exercise 1: Complete the
relationship
34
Exercise 2 : Complete the
relationship
35
Exercise 3
38