As data became more complex in the late 1980s, it became harder to use the traditional ER Model for database modeling. Therefore, improvements were made to the ER Model to handle complex applications better. These enhancements, known as the Extended ER Model, introduced three new concepts:
Generalization is the process of extracting common properties from a set of entities to create a generalized entity.
It is a "bottom-up approach" where two or more entities are combined to form a higher-level entity if they share some common attributes. Subclasses are combined to make a superclass.
Generalization emphasizes similarities among lower-level entity sets and hides differences in the schema.
⇒ Example: Consider the entities Car, Bus, and Motorcycle. These entities can be generalized into one higher-level entity called Vehicle (as shown in below fig).
⇒ Specialization is the opposite of generalization. It breaks down an entity into sub-entities based on their characteristics.
It is a "top-down approach," where a higher-level entity is specialized into two or more lower-level entities.
Specialization identifies subsets of an entity set that share some distinguishing characteristics. It can be repeatedly applied to refine the schema design.
It is depicted by a triangle component labeled "ISA."
Example: The Vehicle entity can be specialized into Car, Truck, or Motorcycle.
Inheritance is a feature of generalization and specialization.
Lower-level entities inherit the attributes of higher-level entities.
Relationships involving higher-level entity sets are inherited by lower-level entity sets.
Example: The entities Car and Bus inherit the attributes of the Vehicle entity. Car is described by the attributes of Vehicle and its own attributes.
Aggregation is used to express a relationship among relationships.
It treats relationships as higher-level entities. It is used when a relationship between two entities needs to be considered as a single entity, which then has a relationship with another entity.
Example: Consider a ternary relationship "works_on" between Employee, Branch, and Job, where an employee works on a particular job at a particular branch.
Suppose we want to assign a manager to each employee, job, branch combination. We need a separate Manager entity set and a relationship between Manager, Employee, Branch, and Job.
⇒ Basic ER Model Limitation: The basic ER model can't represent relationships involving other relationships directly.
⇒ Redundancy Issue: The relationship sets "works_on" and "manages" may represent overlapping information. Every "manages" relationship corresponds to a "works_on" relationship, but not all "works_on" relationships correspond to a "manages" relationship.
⇒ Solution: Eliminate redundancy via aggregation by treating the relationship as an abstract entity. This allows relationships between relationships without introducing redundancy.
⇒ An employee works on a particular job at a particular branch.
⇒ An employee, branch, job combination may have an associated manager. Using aggregation, this can be represented without redundancy in the ER diagram.