Chapter 3
Data Modeling Using the Entity-Relationship (ER) Model
Outline
Overview of Database Design Process
Overview of Database Design Process
Methodologies for Conceptual Design
Example COMPANY Database
Example COMPANY Database (Continued)
ER Model Concepts
Entities and Attributes
Types of Attributes
Types of Attributes (Continued)
Types of Attributes (Continued)
Example of a composite attribute
Entity Types and Key Attributes (1)
Entity Types and Key Attributes (2)
Entity Set
Value Sets (Domains) of Attributes
Displaying an Entity type in ER Diagrams
NOTATION for ER diagrams
Entity Type CAR with two keys and a corresponding Entity Set
Initial Conceptual Design of Entity Types for the COMPANY Database Schema
Initial Design of Entity Types: EMPLOYEE, DEPARTMENT, PROJECT, DEPENDENT
Refining the initial design by introducing relationships
Relationships and Relationship Types
Relationship instances of the WORKS_FOR N:1 relationship between EMPLOYEE and DEPARTMENT
Relationship instances of the M:N WORKS_ON relationship between EMPLOYEE and PROJECT
Relationship type vs. relationship set (1)
Relationship type vs. relationship set (2)
Refining the COMPANY database schema by introducing relationships
ER DIAGRAM – Relationship Types are: WORKS_FOR, MANAGES, WORKS_ON, CONTROLS, SUPERVISION, DEPENDENTS_OF
Discussion on Relationship Types
Constraints on Relationships
Many-to-one (N:1) Relationship
Many-to-many (M:N) Relationship
Recursive Relationship Type
Displaying a recursive relationship
A Recursive Relationship Supervision
Recursive Relationship Type is: SUPERVISION�(participation role names are shown)
Weak Entity Types
Attributes of Relationship types
Example Attribute of a Relationship Type: Hours of WORKS_ON
Notation for Constraints on Relationships
�Alternative (min, max) notation for relationship structural constraints:
The (min,max) notation for relationship constraints
Read the min,max numbers next to the entity type and looking away from the entity type
COMPANY ER Schema Diagram using (min, max) notation
Alternative diagrammatic notation
Relationships of Higher Degree
Summary of notation for ER diagrams
Discussion of n-ary relationships (n > 2)
Example of a ternary relationship
Discussion of n-ary relationships (n > 2)
Another example of a ternary relationship
Displaying constraints on higher-degree relationships
Another Example: A UNIVERSITY Database
UNIVERSITY database conceptual schema
Data Modeling Tools (Additional Material )
Chapter Summary