Enhanced Entity-Relationship Model Overview
EER Extensions: Beyond Basic Entity-Relationship Modeling
Read aloud is unavailable in this browser.
The Limitations of Basic ER Modeling
Peter Chen's original Entity-Relationship model, introduced in 1976, revolutionized database design by providing a visual, intuitive way to model data. Yet as database applications grew more sophisticated, practitioners discovered that basic ER constructs—entities, attributes, and relationships—could not adequately capture the rich semantic nuances of complex real-world domains.
Consider a university database where we need to model Person entities. Some persons are Students, some are Faculty, and some are Staff. A few individuals might even belong to multiple categories—a teaching assistant who is both student and staff, for instance. Basic ER can represent these as separate entities, but it cannot express:
- That Students, Faculty, and Staff are specialized types of Person
- That these subtypes inherit common attributes (name, address, SSN) from Person
- That certain subtypes are mutually exclusive while others may overlap
- That participation in subtypes might be mandatory or optional
These limitations motivated the development of the Enhanced Entity-Relationship (EER) model.
By the end of this page, you will understand: (1) The precise extensions that EER adds to basic ER, (2) Why these extensions are necessary for complex domains, (3) The historical evolution from ER to EER, (4) How EER bridges conceptual modeling and object-oriented design, and (5) The formal semantics underlying each EER construct.
Historical Context: From ER to EER
Understanding EER requires appreciating the historical trajectory of data modeling. The evolution from ER to EER wasn't arbitrary—it was driven by concrete limitations discovered through years of practical database design.
1976: The Birth of ER Modeling
Peter Chen introduced the Entity-Relationship model in his seminal paper "The Entity-Relationship Model—Toward a Unified View of Data." This model provided:
- Entities: Real-world objects or concepts that can be distinctly identified
- Attributes: Properties or characteristics of entities
- Relationships: Associations between entities
- Cardinality constraints: Specification of how many entities participate in relationships
The ER model was revolutionary because it separated the conceptual schema from physical storage considerations. Designers could focus on what data to store, not how to store it.
1980s: Discovering the Semantic Gap
As databases expanded into new domains—CAD/CAM systems, geographic information systems, multimedia applications—practitioners encountered scenarios that basic ER couldn't express elegantly:
- Classification hierarchies: Taxonomies where entities have subtype/supertype relationships
- Attribute inheritance: Common properties shared across related entity types
- Polymorphism: Different entity types responding differently to the same operations
- Complex constraints: Rules about exclusivity, completeness, and mutual dependency
| Era | Model | Key Features | Limitations |
|---|---|---|---|
| 1960s | Hierarchical (IMS) | Tree structures, parent-child links | No many-to-many, data redundancy |
| 1970s | Network (CODASYL) | Graph structures, set relationships | Complex navigation, procedural |
| 1970s | Relational (Codd) | Tables, declarative queries | Weak conceptual abstraction |
| 1976 | ER (Chen) | Conceptual modeling, visual diagrams | No inheritance, limited semantics |
| 1985+ | EER/Extended ER | Specialization, generalization, inheritance | Complex notation, learning curve |
| 1990s | Object-Oriented | Encapsulation, methods, polymorphism | Impedance mismatch with relations |
The EER Response
Enhanced ER emerged through contributions from multiple researchers, most notably:
- Smith and Smith (1977): Introduced generalization and aggregation concepts
- Hammer and McLeod (1981): Developed the SDM (Semantic Data Model)
- Elmasri and Navathe (1984): Synthesized extensions into a coherent EER framework
The EER model preserves backward compatibility with basic ER while adding constructs for:
- Specialization/Generalization — Modeling subtype/supertype hierarchies
- Attribute and Relationship Inheritance — Automatic property propagation
- Categories (Union Types) — Entities that belong to one of several possible supertypes
- Constraints on hierarchies — Disjoint vs. overlapping, total vs. partial participation
Understanding EER's historical evolution reveals that each extension solved a specific practical problem. These aren't arbitrary additions—they emerged from real database design challenges. When you encounter an EER construct, ask: "What problem does this solve?" The answer illuminates proper usage.
Core EER Extensions: A Comprehensive Survey
The Enhanced Entity-Relationship model introduces four major conceptual extensions to basic ER, each addressing a distinct semantic modeling requirement. We examine each extension's purpose, syntax, and formal semantics.
- •Specialization — Top-down process of defining subtypes from a supertype based on distinguishing characteristics. Creates subclasses that inherit attributes from their superclass.
- •Generalization — Bottom-up process of abstracting common features from multiple entity types to create a new supertype. Combines similar entities under a unifying concept.
- •Inheritance — Automatic propagation of attributes and relationship participation from supertypes to subtypes. Subtypes possess all properties of their supertypes plus their own local attributes.
- •Categories (Union Types) — Subclasses that can inherit from multiple distinct supertypes, but each instance belongs to exactly one of those supertypes. Models heterogeneous collections.
Specialization: The Top-Down Perspective
Specialization starts with an existing supertype and defines meaningful subsets based on distinguishing characteristics. Consider an Employee entity:
Employee (supertype)
├── Secretary (subtype)
│ └── typing_speed, shorthand_level
├── Engineer (subtype)
│ └── specialization, professional_license
└── Manager (subtype)
└── budget_authority, team_size
Each subtype:
- Inherits all attributes of Employee (SSN, name, salary, hire_date)
- Has its own local attributes specific to that role
- May participate in local relationships not applicable to other subtypes
The Defining Predicate Concept
Each subtype is characterized by a defining predicate (or defining condition) that determines membership. This predicate can be:
-
Attribute-defined: Membership determined by a specific attribute value
- Example:
job_type = 'Secretary'→ Secretary subtype
- Example:
-
User-defined: Membership explicitly assigned, not derivable from attributes
- Example: Administrative decision about which employees are managers
Attribute-defined specialization uses a discriminator attribute (like employee_type) where each value corresponds to a subtype. This enables automatic subset identification. User-defined specialization requires explicit membership assignment—the database cannot infer subtype membership from stored data.
Generalization: The Bottom-Up Perspective
Generalization reverses the conceptual direction of specialization. Rather than starting with a supertype and dividing it, generalization observes multiple existing entity types and recognizes their common properties.
Car → ─┐ Vehicle (generalized supertype)
├─ common ──► └── make, model, year, VIN
Truck ─┘
Historically, CAR and TRUCK might have been modeled as separate entities. Through generalization, we recognize they share fundamental attributes and create VEHICLE as a unifying supertype.
Why the Distinction Matters
Although specialization and generalization produce identical schema structures, the conceptual distinction is important:
- Specialization reflects analytical decomposition: "What subtypes exist within this entity?"
- Generalization reflects synthetic abstraction: "What do these entities have in common?"
In practice, database designers employ both perspectives. Initial modeling often uses generalization to discover natural hierarchies, while refinement uses specialization to capture domain-specific distinctions.
- •Starts with existing entity
- •Identifies distinguishing features
- •Creates specialized subtypes
- •Top-down analytical process
- •Adds local attributes to subtypes
- •Common in schema refinement
- •Starts with multiple entities
- •Identifies common features
- •Creates unifying supertype
- •Bottom-up synthetic process
- •Factors out shared attributes
- •Common in schema integration
Inheritance Mechanisms in EER
Inheritance is the mechanism by which subtypes automatically acquire the properties of their supertypes. In EER, inheritance encompasses three dimensions:
- Attribute Inheritance: Subtypes possess all attributes of their supertypes
- Relationship Inheritance: Subtypes participate in all relationships of their supertypes
- Constraint Inheritance: Constraints on supertypes apply to subtypes
Formal Definition of Inheritance
Given a supertype S and a subtype T where T is a specialization of S:
For every entity e ∈ T:
- e ∈ S (set inclusion: subtype is a subset of supertype)
- e possesses all attributes defined on S
- e can participate in all relationships where S participates
- All key constraints on S apply to e
This is sometimes called the IS-A relationship: every instance of T IS-A instance of S.
Single Inheritance vs. Multiple Inheritance
EER supports both inheritance patterns:
Single Inheritance: Each subtype has exactly one immediate supertype
Person
└── Employee
└── Manager
Multiple Inheritance: A subtype has more than one immediate supertype
Person ────────┐
├──► StudentEmployee
Student ───────┘
Multiple inheritance creates complexity: what happens when two supertypes define attributes with the same name? EER typically requires explicit resolution or prohibits naming conflicts.
Multiple inheritance introduces the 'diamond problem': if B and C both inherit from A, and D inherits from both B and C, how many copies of A's attributes does D have? EER resolves this by treating inheritance as set membership—D belongs to exactly one copy of the attribute hierarchy. However, mapping to relational schemas requires careful handling.
The Inheritance Lattice
When multiple inheritance is permitted, the collection of types forms not a tree but a lattice—a partially ordered set where any two types have a least upper bound (most specific common supertype) and greatest lower bound (most general common subtype).
Consider a research university schema:
Person
/
Student Employee
| \ / |
| \ / |
UndergraduateStudent ResearchAssistant Professor
(Student AND Employee)
ResearchAssistant exhibits multiple inheritance, belonging to both Student and Employee supertypes. Such entities:
- Inherit all Student attributes (student_id, major, GPA, enrollment_date)
- Inherit all Employee attributes (employee_id, salary, department, hire_date)
- May have local attributes (research_project, advisor_id, funding_source)
Semantic Integrity of Inheritance
Inheritance maintains semantic integrity through several invariants:
- Subset Invariant: Type(subtype) ⊆ Type(supertype) at all times
- Attribute Completeness: Every subtype entity has values for all inherited attributes
- Relationship Eligibility: Subtype entities can participate wherever supertype can
- Constraint Propagation: All supertype constraints bind subtype entities
| Inheritance Type | Structure | Relational Mapping | Considerations |
|---|---|---|---|
| Single (chain) | Linear hierarchy | Single table or multiple joined tables | Simplest to implement |
| Single (tree) | One parent per subtype | Table-per-type or unified | Moderate complexity |
| Multiple | Lattice structure | Requires join views or denormalization | Complex, potential conflicts |
| Repeated | Same supertype via multiple paths | Careful key management needed | Diamond problem present |
Categories: Modeling Union Types
While specialization creates subtypes that are subsets of a single supertype, categories (also called union types) create a subclass that represents a collection of entities from multiple different entity types.
The Category Concept
A category is a subtype that has more than one potential supertype, but each entity in the category belongs to exactly one of those supertypes. This is fundamentally different from multiple inheritance, where an entity belongs to all supertypes simultaneously.
Illustrative Example: Vehicle Owner
Consider a vehicle registration system that must track vehicle owners. An owner can be:
- A Person (individual owner)
- A Company (corporate owner)
- A Bank (for leased vehicles)
These three entity types have no common supertype—they share no meaningful attributes:
Person Company Bank
SSN TaxID BankCode
Name CompanyName BankName
DateOfBirth Industry RoutingNumber
Yet we need to create a VEHICLE_OWNER category to serve as the owner reference for vehicles:
Person
| ┐
Company ├───────► VEHICLE_OWNER ◄────── VEHICLE
| ┘ (category) (owns)
Bank
Any given VEHICLE_OWNER is exactly one of: a Person, a Company, or a Bank—never a combination.
Multiple Inheritance: Entity belongs to ALL specified supertypes (A student-employee is BOTH a student AND an employee).
Category: Entity belongs to EXACTLY ONE of the specified supertypes (A vehicle owner is EITHER a person OR a company OR a bank, but never multiple).
Formal Semantics of Categories
Given a category C defined over supertypes S₁, S₂, ..., Sₙ:
C ⊆ (S₁ ∪ S₂ ∪ ... ∪ Sₙ)
For every entity e ∈ C:
∃! i ∈ {1,2,...,n} : e ∈ Sᵢ
(e belongs to exactly one supertype)
Selective Inheritance in Categories
Entities in a category inherit attributes from their specific supertype, not from all potential supertypes:
- A VEHICLE_OWNER that is a Person has SSN, Name, DateOfBirth
- A VEHICLE_OWNER that is a Company has TaxID, CompanyName, Industry
- There is no unified attribute set for VEHICLE_OWNER
This selective inheritance contrasts with specialization where all subtypes share the supertype's complete attribute set.
Total vs. Partial Categories
-
Total Category: Every entity in each supertype must belong to the category
- Example: If we require every Person, Company, and Bank to be a potential vehicle owner
-
Partial Category: Entities in supertypes may or may not belong to the category
- Example: Only some Persons own vehicles; the category is partial on Person
Most practical categories are partial—not every instance of each supertype participates.
| Characteristic | Specialization/Generalization | Categories (Union Types) |
|---|---|---|
| Direction | Single supertype → multiple subtypes | Multiple supertypes → single subtype |
| Inheritance | Complete: all supertype attributes | Selective: only the specific supertype's attributes |
| Entity membership | Subtype ⊆ Supertype | Subtype ⊆ Union of Supertypes |
| Supertype relationship | Common parent | Heterogeneous parents |
| Use case | Taxonomic classification | Heterogeneous collections |
| Mapping complexity | Moderate | Higher: requires type discriminator |
Constraints on Specializations
EER introduces two orthogonal constraint dimensions on specialization hierarchies. These constraints capture essential business rules about subtype membership.
Dimension 1: Disjointness Constraint
Determines whether entity instances can belong to multiple subtypes simultaneously.
Disjoint (d): Each supertype entity can belong to at most one subtype
Employee
├── [d] Hourly_Employee ─┐
│ Salary_Employee ├── Mutually exclusive
│ Contract_Employee ┘
An employee cannot be simultaneously hourly AND salaried.
Overlapping (o): Supertype entities may belong to multiple subtypes
Person
├── [o] Student ─┐
│ Employee ├── May overlap
│ ┘
A person can be both a student AND an employee (graduate teaching assistant).
- •Subtypes are mutually exclusive
- •Each entity in at most one subtype
- •Symbol: 'd' or disjoint circle
- •Enforces classification uniqueness
- •Easier to map to relations
- •Example: Vehicle → Car XOR Truck
- •Subtypes may share members
- •Entity can belong to multiple subtypes
- •Symbol: 'o' or overlapping circle
- •Allows multi-role classification
- •Complex mapping strategies needed
- •Example: Person → Student AND Employee
Dimension 2: Completeness Constraint
Determines whether every supertype entity must belong to at least one subtype.
Total (double line): Every supertype entity must belong to at least one subtype
Vehicle ══╤══ [total]
├── Car
├── Truck
└── Motorcycle
Every vehicle must be classified as a car, truck, or motorcycle—no unclassified vehicles allowed.
Partial (single line): Supertype entities may exist without belonging to any subtype
Employee ──┬── [partial]
├── Manager
└── Engineer
An employee may be neither a manager nor an engineer—perhaps a general administrative worker.
The two constraint dimensions are orthogonal, creating four possible combinations:
- Disjoint + Total: Every entity in exactly one subtype
- Disjoint + Partial: Every entity in at most one subtype
- Overlapping + Total: Every entity in one or more subtypes
- Overlapping + Partial: Entities may be in zero, one, or multiple subtypes
| Combination | Subtype Membership | Real-World Example | Cardinality |
|---|---|---|---|
| Disjoint + Total | Exactly one subtype | Tax filing status (Single, Married, Head of Household) | Partition |
| Disjoint + Partial | At most one subtype | Employee specialization (some employees have no specialty) | Classification |
| Overlapping + Total | One or more subtypes | Person roles in a production (Actor, Director—must have at least one) | Covering |
| Overlapping + Partial | Zero or more subtypes | Person skills (may have multiple or none) | General subset |
EER Notation and Diagrammatic Conventions
EER diagrams extend basic ER notation with additional symbols to represent specialization hierarchies and constraints. Understanding these conventions is essential for reading and creating EER diagrams.
Supertype/Subtype Representation
Subtypes are connected to their supertype via a specialization circle (sometimes called a 'connector circle' or 'subset symbol'):
┌───────────────┐
│ EMPLOYEE │ ← Supertype (rectangle)
└───────┬───────┘
│
╱│╲ ← Specialization circle with constraint
╱─┼─╲
│
┌───┴───┐
│ │
┌───┴───┐ ┌─┴─────┐
│ HOURLY │ │SALARIED│ ← Subtypes (rectangles)
└────────┘ └────────┘
Constraint Notation Within the Circle
- d: Disjoint constraint (subtypes are mutually exclusive)
- o: Overlapping constraint (subtypes may overlap)
- Double line to circle: Total participation (every supertype entity must be in a subtype)
- Single line to circle: Partial participation (supertype entities may not be in any subtype)
- •Supertype: Standard entity rectangle at the top of hierarchy
- •Subtype: Standard entity rectangle connected via specialization circle
- •Specialization Circle: Contains 'd' (disjoint) or 'o' (overlapping)
- •Total Participation: Double line from supertype to circle
- •Partial Participation: Single line from supertype to circle
- •Inheritance Lines: Lines from circle down to each subtype
- •Discriminator Attribute: Label on line or in circle indicating the attribute-defined basis
- •Category Symbol: Circle with 'U' (union) or 'subset' symbol, connecting multiple supertypes
Attribute-Defined Specialization Notation
When specialization is attribute-defined, the discriminator attribute is typically shown near the specialization circle:
┌───────────────┐
│ EMPLOYEE │
│ job_type ◄───┼───── Discriminator attribute
└───────┬───────┘
│
[d,job_type] ← Constraint and discriminator in circle
┌───┴───┐
│ │
Secretary Engineer ← Subtype determined by job_type value
Category (Union Type) Notation
Categories use a circle with a union symbol (∪) or 'U' letter:
Person Company Bank
│ │ │
└─────────────┼─────────────┘
│
(U) ← Category symbol
│
VEHICLE_OWNER
Shared vs. Separate Subtype Boxes
In complex hierarchies, subtypes may themselves be supertypes of further subtypes, creating multi-level hierarchies:
PERSON
│
(d)
┌─┴─┐
│ │
STUDENT EMPLOYEE
│ │
(o) (d)
┌─┴─┐ ┌─┴─┐
│ │ │ │
Undergrad Graduate Hourly Salaried
Different textbooks and tools use slight notation variations. Some use triangles instead of circles for specialization connectors. Some use 'x' for disjoint instead of 'd'. Always clarify the notation convention being used when reading or creating EER diagrams.
Formal Semantics of EER Extensions
To ensure precise understanding, we summarize the formal semantics of each EER extension using set-theoretic notation.
Let:
- S denote a supertype entity set
- T₁, T₂, ..., Tₙ denote subtype entity sets of S
- e denote an individual entity instance
- attr(X) denote the attribute set of entity type X
12345678910111213141516171819202122232425262728293031323334353637
=== SPECIALIZATION / GENERALIZATION === Subset Property: ∀ i ∈ {1,...,n}: Tᵢ ⊆ S Attribute Inheritance: ∀ i: attr(Tᵢ) ⊇ attr(S) Subtypes inherit all supertype attributes === DISJOINTNESS CONSTRAINT === Disjoint (d): ∀ i,j where i≠j: Tᵢ ∩ Tⱼ = ∅ No entity belongs to multiple subtypes Overlapping (o): ∃ i,j where i≠j: Tᵢ ∩ Tⱼ ≠ ∅ is permitted Entities may belong to multiple subtypes === COMPLETENESS CONSTRAINT === Total: S = T₁ ∪ T₂ ∪ ... ∪ Tₙ Every supertype entity is in at least one subtype Partial: S ⊇ T₁ ∪ T₂ ∪ ... ∪ Tₙ Some supertype entities may not be in any subtype === CATEGORY (UNION TYPE) === Given category C over supertypes S₁, S₂, ..., Sₘ: C ⊆ S₁ ∪ S₂ ∪ ... ∪ Sₘ Exclusive membership: ∀ e ∈ C: |{i : e ∈ Sᵢ}| = 1 Each category entity belongs to exactly one supertypeIntegrity Constraints Implied by EER
These formal definitions translate to database integrity constraints:
- Referential Integrity: Subtype keys must reference valid supertype entities
- Disjointness Enforcement: CHECK constraints or triggers prevent multiple subtype membership
- Completeness Enforcement: Triggers ensure supertype insertions create corresponding subtype records
- Category Type Tracking: Discriminator columns identify which supertype a category entity belongs to
Understanding these formal semantics enables correct translation of EER models to relational schemas and proper constraint implementation.
KEEP LEARNING
There’s more to understand.
You’re reading the introduction. Create a free account to read the complete lesson, save notes and keep track of your progress.