Chapter 2_Conceptual data model
Chapter 2_Conceptual data model
Database
CHAPTER 2
Content
❑ Conceptual Data Modeling
❑ Entity Relationship (ER) Model Concepts
❑ Entity Relationship Diagram (ERD)
❑ Enhanced-ER (EER) Model Concepts
❑ Tools
2
Chapter 2 – Entity Relationship Model
Content
❑ Conceptual Data Modeling
❑ Entity Relationship (ER) Model Concepts
❑ Entity Relationship Diagram (ERD)
❑ Enhanced-ER (EER) Model Concepts
❑ Tools
3
Chapter 2 – Entity Relationship Model
4
Chapter 2 – Entity Relationship Model
5
Chapter 2 – Entity Relationship Model
6
Chapter 2 – Entity Relationship Model
Content
❑ Conceptual Data Modeling
❑ Entity Relationship (ER) Model Concepts
o Entities, Entity Types, and Characteristics
o Relationships, Relationship Types, and Characteristics
o Weak Entities
o ER Diagrams (ERD)
❑ Entity Relationship Diagram (ERD)
❑ Enhanced-ER (EER) Model Concepts
❑ Tools
7
Chapter 2 – Entity Relationship Model
Entities – Objects
❑ An entity is an object (a thing) in the real world with an independent existence.
o Physical existence (e.g., a particular person, car, house, or employee)
o Or a conceptual/abstract existence (e.g., a company, a job, or a university course)
Entity “Employee e1” Entity “Company c1”
8
Chapter 2 – Entity Relationship Model
9
Chapter 2 – Entity Relationship Model
10
Chapter 2 – Entity Relationship Model
Simple (Atomic)
Attribute
Composite
Attribute
11
Chapter 2 – Entity Relationship Model
Multi-valued
Attribute
12
Chapter 2 – Entity Relationship Model
Age
13
Chapter 2 – Entity Relationship Model
Complex
Attribute
14
Chapter 2 – Entity Relationship Model
Employee’s ID:
SSN (Social Security Number)
15
Chapter 2 – Entity Relationship Model
Content
❑ Conceptual Data Modeling
❑ Entity Relationship (ER) Model Concepts
o Entities, Entity Types, and Characteristics
o Relationships, Relationship Types, and Characteristics
o Weak Entities
o ER Diagrams (ERD)
❑ Entity Relationship Diagram (ERD)
❑ Enhanced-ER (EER) Model Concepts
❑ Tools
16
Chapter 2 – Entity Relationship Model
xc
x
xc
c
18
Chapter 2 – Entity Relationship Model
Relationship Characteristics
❑ Characteristics of a relationship type:
o Attributes
o Degree
o Cardinality Constraint
xc
xc
x
xc
c
19
Chapter 2 – Entity Relationship Model
xc
x
xc
c
20
Chapter 2 – Entity Relationship Model
SUPERVISE
21
Chapter 2 – Entity Relationship Model
xc
x
xc
c A department can have zero or multiple students, while a student
can be affiliated with zero or only one department.
22
Chapter 2 – Entity Relationship Model
23
Chapter 2 – Entity Relationship Model
24
Chapter 2 – Entity Relationship Model
Content
❑ Conceptual Data Modeling
❑ Entity Relationship (ER) Model Concepts
o Entities, Entity Types, and Characteristics
o Relationships, Relationship Types, and Characteristics
o Constraints
o Weak Entities
o ER Diagrams (ERD)
❑ Entity Relationship Diagram (ERD)
❑ Enhanced-ER (EER) Model Concepts
❑ Tools
25
Chapter 2 – Entity Relationship Model
Owner
Entity Type
26
Chapter 2 – Entity Relationship Model
Content
❑ Conceptual Data Modeling
❑ Entity Relationship (ER) Model Concepts
o Entities, Entity Types, and Characteristics
o Relationships, Relationship Types, and Characteristics
o Constraints
o Weak Entities
o ER Diagrams (ERD)
❑ Entity Relationship Diagram (ERD)
❑ Enhanced-ER (EER) Model Concepts
❑ Tools
27
Chapter 2 – Entity Relationship Model
Examples of ERDs
Alternative Cardinality Notation
28
Chapter 2 – Entity Relationship Model
Summary of Notation
Entity-Relationship Notation Constraint Notation
Attribute
29
Chapter 2 – Entity Relationship Model
Practice (ER)
Identify entity types, relationships, and constraints from data requirement specification.
▪ A SUPPLIER may supply many ITEMs. Each ITEM is supplied by any number of SUPPLIERs.
▪ Each ITEM must be used in the assembly of at least one PRODUCT and may be used in many
products.
▪ A SUPPLIER may send many SHIPMENTs. However, each shipment must be sent by exactly one
SUPPLIER.
▪ A SUPPLIER may be able to supply an item but may not yet have sent any shipments of that item.
▪ A SHIPMENT must include one (or more) ITEMs. An ITEM may be included on several
SHIPMENTs.
▪ A CUSTOMER may submit any number of ORDERs. However, each ORDER must be submitted by
exactly one CUSTOMER.
▪ An ORDER must request one (or more) PRODUCTs. A given PRODUCT may not be requested on
any ORDER or may be requested on one or more orders.
30
Chapter 2 – Entity Relationship Model
Content
❑ Conceptual Data Modeling
❑ Entity Relationship (ER) Model Concepts
❑ Entity Relationship Diagram (ERD)
❑ Enhanced-ER (EER) Model Concepts
o Supertypes and Subtypes
o Supertypes/Subtypes Relationship Constraints
o Specialization and Generalization
❑ Tools
31
Chapter 2 – Entity Relationship Model
32
Chapter 2 – Entity Relationship Model
33
Chapter 2 – Entity Relationship Model
Content
❑ Conceptual Data Modeling
❑ Entity Relationship (ER) Model Concepts
❑ Entity Relationship Diagram (ERD)
❑ Enhanced-ER (EER) Model Concepts
o Supertypes and Subtypes
o Supertypes/Subtypes Relationship Constraints
o Specialization and Generalization
❑ Tools
34
Chapter 2 – Entity Relationship Model
35
Chapter 2 – Entity Relationship Model
Disjointedness Constraint
❑ Specify whether an entity in the supertype can be a Overlapping
member of more than one subtype.
❑ Disjoint specialization rule
o An entity in the supertype can belong to only one subtype.
o Notation: d
❑ Overlapping specialization rule
o An entity in the supertype to be a member of more than Disjoint
one subtype simultaneously.
o Notation: o
36
Chapter 2 – Entity Relationship Model
Example
(total, overlapping)
(total, disjoint)
(partial, disjoint)
37
Chapter 2 – Entity Relationship Model
Content
❑ Conceptual Data Modeling
❑ Entity Relationship (ER) Model Concepts
❑ Entity Relationship Diagram (ERD)
❑ Enhanced-ER (EER) Model Concepts
o Supertypes and Subtypes
o Supertypes/Subtypes Relationship Constraints
o Specialization and Generalization
❑ Tools
38
Chapter 2 – Entity Relationship Model
39
Chapter 2 – Entity Relationship Model
Define supertypes
GENERALIZATION
40
Chapter 2 – Entity Relationship Model
Content
❑ Conceptual Data Modeling
❑ Entity Relationship (ER) Model Concepts
❑ Entity Relationship Diagram (ERD)
❑ Enhanced-ER (EER) Model Concepts
❑ Tools
41
Chapter 2 – Entity Relationship Model
Popkin Software System Architect 2001 Data modeling, object modeling, process modeling,
structured analysis/design
Sybase Enterprise Application Suite Data modeling, business logic modeling
Visio Visio Enterprise Data modeling, design and reengineering Visual Basic
and Visual C++
JGraph Ltd Draw.io General tool for creating visual elements.
42
Chapter 2 – Entity Relationship Model
THANK YOU
FOR YOUR ATTENTION!
43