Académique Documents
Professionnel Documents
Culture Documents
INTERNATIONAL EDITION
Chapter 5
Entity Relationship (ER) Modelling
1
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
2
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
3
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
A Recipe ERD
4
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
Entities
• Refers to entity set and not to single entity
occurrence
• Corresponds to table and not to row in relational
environment
• In UML notation, an entity is represented by a
box that is subdivided into three parts.
• Entity name, a noun, is usually written in capital
letters
5
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
Attributes
• In the UML model, the attributes are written in
the attribute box below the entity rectangle
6
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
Domains
7
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
8
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
9
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
10
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
11
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
12
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
13
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
14
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
15
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
16
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
17
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
Derived Attributes
18
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
19
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
20
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
Relationships
21
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
Multiplicity
22
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
Multiplicity(continued)
23
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
Existence Dependence
• Existence dependence
– Exist 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 refers to such an entity as strong or regular
entity
24
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
Relationship Strength
25
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
26
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
27
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
28
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
Strong (Identifying) Relationships
29
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
Weak Entities
• Weak entity meets two conditions
– Existence-dependent
• Cannot exist without entity with which it has a relationship
– Has primary key that is partially or totally derived from
parent entity in relationship
30
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
31
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
32
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
Relationship Participation
• 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
33
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
34
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
35
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
36
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
37
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
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
38
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
39
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
40
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
41
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
Recursive Relationships
42
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
43
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
44
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
45
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
46
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
47
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
48
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
Composite Entities
• Also known as bridge entities
• Composed of primary keys of each of the entities
to be connected
• May also contain additional attributes that play no
role in connective process
49
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
50
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
51
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
52
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
Association Class
53
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
Developing an ER Diagram
54
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
55
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
56
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
57
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
58
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
59
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
60
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
61
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
62
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
63
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
64
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
65
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
66
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
67
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
68
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
69
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
70
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
71
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
Summary
72
DATABASE SYSTEMS: Design Implementation and Management (Rob, 2
Coronel & Crockett 9781844807321)
Summary (continued)
73