The Enhanced ER Model
The late 1980s saw a surge in data complexity, making it increasingly challenging to represent databases using the conventional ER representation. In order to make the current ER Model more capable of handling complicated applications, certain additions or upgrades were added to it.
Consequently, three new ideas were introduced to the current ER Model as part of the Enhanced ER Model along with additional modifications. These concepts were:
- Generalization
- Specialization
- Aggregation
Let’s understand what they are, and why were they added to the existing ER Model.
Generalization:
- When two or more lower-level entities merge to generate a higher-level object if they share some properties, this process is known as generalization.
- In principle, a higher-level entity can also join forces with lower-level entities to create an even higher-level entity.
- The sole difference between generalization and the subclass and superclass systems is the technique. Generalization employs a bottom-up strategy.
- Generalization is the process of combining entities to create a more generalized entity or combining subclasses to create a superclass.
- The extraction of common characteristics from a group of things and the subsequent creation of a generalized entity are both examples of generalization.
- A higher-level entity can be generalized from two or more lower-level entities if they share some properties.
- This is a bottom-up technique.
- For Example, Figure 1 illustrates how STUDENT and FACULTY, for instance, might be generalized to a higher-level object named PERSON. In this scenario, generic characteristics like P_NAME and P_ADD are integrated into a higher entity (PERSON), whereas specialized properties like S_FEE are integrated into a higher entity (STUDENT).
Specialization:
- Specialization is the antithesis of generalization since it takes a top-down approach. One higher-level entity can be divided into two lower-level entities by specialization.
- The subset of an entity collection that has some distinctive traits is identified by specialization.
- The superclass is typically specified first, followed by the subclass and any associated properties, before the relationship set is added.
- During specialization, an entity is split up into smaller entities according to its traits. The top-down method involves specializing the higher-level object into two or more lower-level entities.
- For Example, Figure 2 illustrates how a DEVELOPER, TESTER, etc. specialization may be applied to an EMPLOYEE object in an employee management system. Common characteristics like E_NAME, E_SAL, and so forth in this situation become a part of a higher entity (EMPLOYEE), whereas specialized properties like TES_TYPE become a part of a specialized entity (TESTER).
Aggregation:
- The relationship between two entities is handled as a single entity in aggregate.
- When relationships between entities are aggregated, a higher-level entity is created.
- The relationship between an entity and a relationship, which may be necessary in some cases, cannot be represented in an ER diagram.
- In some circumstances, a relationship between two entities that correspond to it is combined into a higher-level entity.
- It is possible to describe connections as higher-level entity sets through the abstraction of aggregation.
- For Example, An employee working on a project, for instance, could need some equipment. In order to connect the connection WORKS_FOR and entity MACHINERY, a REQUIRE relationship is required. The connection WORKS_FOR with its components EMPLOYEE and PROJECT is aggregated into a single entity using aggregation, and a relationship REQUIRE is established between the aggregated entity and MACHINERY.
Representing Aggregation Via Schema
The following should be included in the schema you develop to indicate aggregation.
- the essential factor in the aggregate connection
- the primary key to the description property for the related entity set, if one exists.
- descriptive attribute, if exists
Difference between Specialization and Generalization
Specialization |
Generalization |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Conclusion
- A new entity is created through the process of generalization by combining the characteristics of two or more existing ones.
- The generalized entity is the name given to the just-established entity.
- Generalization is done via a bottom-up method.
- It simplifies or generalizes the entities.
- Additionally, lower-level entities and higher-level entities can be mixed.
- In this strategy, inheritance may be employed.
- In Specialisation, there is inheritance.
- A higher entity is separated into subordinate entities during specialization.
- It is possible to describe connections as higher-level entity sets through the abstraction of aggregation.
- When relationships between entities are aggregated, a higher-level entity is created.