The Enhanced Entity–Relationship (EER) model is an extended version of the Entity–Relationship (ER) model used in database design. It incorporates additional semantic constructs and modeling capabilities beyond the basic ER model, enabling more accurate representation of complex real-world scenarios through concepts such as specialization, generalization, union types, and inheritance.
The EER model was developed in the 1980s by database researchers including Ramez Elmasri and Shamkant Navathe to address the limitations of the basic ER model when modeling complex databases in domains such as engineering design, manufacturing systems (CAD/CAM), telecommunications networks, geographic information systems (GIS), and complex software applications.
The EER model extends the basic ER model by adding support for more complex data relationships and semantic information. While the traditional ER model effectively represents entities, attributes, and relationships, it lacks the ability to model hierarchies, inheritance, and classification structures that are common in real-world databases.
The EER model retains all concepts from the basic ER model—including entities, attributes, relationships, keys, and cardinality constraints, while adding new constructs to handle:
These enhancements make the EER model particularly suitable for modeling complex enterprise databases, object-oriented applications, and systems requiring sophisticated classification schemes.
A subclass (or subtype) is an entity type that has distinct attributes or relationships in addition to those inherited from another entity type, called the superclass (or supertype). The subclass is a subset of the superclass, meaning every instance of a subclass is also an instance of its superclass.
Example: In a university database,
Person might be a superclass with subclasses
StudentProfessorStaffEach subclass inherits common attributes like
NameAddressDateOfBirthfrom Person, while having specific attributes such as
StudentIDMajorStudentRankDepartmentfor Professor.
Formally, if S is a subclass of C (the superclass), then:
Specialization is a top-down conceptual refinement process where a higher-level entity type (superclass) is subdivided into lower-level, more specialized entity types (subclasses) based on distinguishing characteristics. It emphasizes differences among entities within the superclass.
Process:
Example: Starting with an Employee entity, specialization might identify distinct types based on job function:
Employee (superclass) specializes into:
Secretary (with attribute TypingSpeed)Engineer (with attribute EngineeringType)Technician (with attribute TechGrade)Specialization can be:
EmployeeType)Generalization is a bottom-up abstraction process where multiple entity types with common characteristics are combined into a higher-level, generalized entity type (superclass). It emphasizes similarities among entities.
Process:
Example: Separate entities Car, Truck, and Motorcycle can be generalized into a superclass Vehicle containing common attributes like VehicleID, Color, Year, and Manufacturer, while specific attributes remain with subclasses.
Specialization and generalization are inverse processes: specialization creates subclasses from a superclass, while generalization creates a superclass from existing entity types.
Inheritance is a fundamental principle of the EER model where subclasses automatically inherit all attributes and relationships from their superclass(es). This promotes data consistency and reduces redundancy in the model.
Types of inheritance:
Single inheritance: A subclass inherits from exactly one superclass.
Student inherits from PersonMultiple inheritance: A subclass inherits from multiple superclasses, acquiring attributes and relationships from all parents.
TeachingAssistant might inherit from both Student and EmployeeInheritance properties:
A union type (or category) represents a subclass that is a subset of the UNION of two or more distinct superclasses. Unlike regular subclasses that inherit from a single superclass, a category can have instances from multiple different entity types.
Characteristics:
Notation: Represented by a circle with the union symbol (∪) connected to all superclasses, with an arc and subset symbol (⊂) connecting to the category.
Example: In a vehicle registration database, an Owner category can be defined as a subset of PERSON ∪ BANK ∪ COMPANY. Each vehicle owner is either a person, a bank, or a company, but not multiple types simultaneously. The Owner category would have a relationship Owns with the Vehicle entity.
Formal definition: If category T is defined on superclasses S1, S2, ..., Sn, then:
Aggregation is an abstraction concept that treats a relationship as a higher-level entity, allowing relationships to participate in other relationships. This is useful when modeling complex scenarios where relationships themselves have attributes or participate in additional relationships.
Example: In a project management system:
WorksOn)WorksOn relationship as an entity that can be related to MachineryThis allows modeling: "Employee E working on Project P requires Machinery M" without creating artificial intermediate entities.
Numerous tools support EER diagram creation, ranging from specialized database design software to general-purpose diagramming applications.
Oracle SQL Developer Data Modeler:
ERwin Data Modeler (by erwin, Inc.):
PowerDesigner (by SAP):
Lucidchart:
Draw.io (diagrams.net):
Creately:
Visual Paradigm:
DbSchema:
When choosing an EER modeling tool, consider: