Data Modeling (DM) Using Entity-Relationship Model: Text Book Sections: All
Data Modeling (DM) Using Entity-Relationship Model: Text Book Sections: All
Relationship Model
Chapter 3
1
Outline …
2
Using High-Level Conceptual DMs for DB Design
Conceptual DB design
Logical DB design
Physical DB design
Implementation
3
DM Using the Entity-Relationship (ER) Model
4
Example: Requirements of a COMPANY
7
Entities and Attributes …
Entity
Thing in real world with independent existence
Attributes
Particular properties that describe entity
Types of attributes:
Composite versus simple (atomic) attributes
Single-valued versus multivalued attributes
Stored versus derived attributes
Key attributes
8
… Entities and Attributes
9
Entity Types, Entity Sets, Keys, and Value Sets …
Entity type: Collection (or set) of entities that have the same attributes
10
… Entity Types, Entity Sets, Keys, and Value Sets …
11
Initial Conceptual Design of the COMPANY DB
12
Relationship Types, Relationship Sets, Roles, and
Structural Constraints
Relationship instances ri
Each ri associates n individual entities (e1, e2, ..., en)
Each entity ej in ri is a member of entity set Ej
13
Turnery Relationship
14
Role Names and Recursive Relationships
Role names: signifies role that a participating entity plays in each relationship
instance
Recursive relationships
Same entity type participates more than once in a relationship type in
different roles
Must specify role name
15
Recursive Relationship
16
Constraints on Binary Relationship Types
Participation constraint
Specifies whether existence of entity depends on its being related to another
entity
Types: total and partial
17
Attributes of Relationship Types
Attributes of 1:1 or 1:N relationship types can be migrated to one entity type
18
Weak Entity Types
Do not have key attributes of their own. They are Identified by being related to
specific entities from another entity type
19
ER Diagrams, Naming Conventions, and Design Issues
20
Alternative Notations for ER Diagrams
Replaces cardinality ratio (1:1, 1:N, M:N) and single/double line notation for
participation constraints
21
22
Reading List
http://www.databaseanswers.org/data_models/
23
24
Disclaimer
The lecture slides contain original work of Elmasri & Navathe. The slides are
intended for the sole purpose of instruction of Database Systems course at
KFUPM. All copyrighted materials belong to their original owner(s).
25