Extended ER Features: Generalization, Specialization & Aggregation in DBMS

Extended ER Features Generalization, Specialization & Aggregation in DBMS

Extended Entity Relationship (ER) Features

As the complexity of data increased in the late 1980s, it became more and more difficult to use the traditional ER Model for database modelling. Hence some improvements or enhancements were made to the existing ER Model to make it able to handle the complex applications better.

Hence, as part of the Extended ER Model, along with other improvements, three new concepts were added to the existing ER Model:
  1. Generalization
  2. Specialization
  3. Aggregation

1. Generalization

  • Generalization is the process of extracting common properties from a set of entities and create a generalized entity from it.
  • Generalization is a "bottle-up approach" in which two or more entities can be combined to form a higher level entity if they have some attributes in common.
  • Subclasses are combined to make a superclass.
  • Generalization is used to emphasize the similarities among lower-level entity set and to hide differences in the schema.
Example:
Consider we have 3 sub entities Car, Bus and Motorcycle. Now these three entities can be generalized into one higher-level entity (or super class) named as Vehicle.

generalization in dbms with example

2. Specialization

  • Specialization is opposite of Generalization.
  • In Specialization, an entity is broken down into sub-entities based on their characteristics.
  • Specialization is a "Top-down approach" where higher level entity is specialized into two or more lower level entities.
  • Specialization is used to identify the subset of an entity set that shares some distinguishing characteristics
  • Specialization can be repeatedly applied to refine the design of schema.
  • Normally, the superclass is defined first, the subclass and its related attributes are defined next, and relationship set are then added. 
  • Depicted by triangle component labeled ISA
Example:
Vehicle entity can be a Car, Bus or Motorcycle.

specialization in dbms with example

3. Aggregation

  • Aggregation is used when we need to express a relationship among relationships.
  • Aggregation is an abstraction through which relationships are treated as higher level entities.
  • Aggregation is a process when a relationship between two entities is considered as a single entity and again this single entity has a relationship with another entity.
Note: Basic E-R model can't represent relationships involving other relationships.

Example:
  • Consider a ternary relationship works_on between Employee, Branch and Job.
  • An Employee works on a particular job at a particular branch.
Suppose we want to assign a manager for jobs performed by an employee at a branch (i.e. want to assign managers to each employee, job, branch combination)
  • Need a separate manager entity-set.
  • Relationship between each manager, employee, branch and job entity.
With Aggregation the ER diagram can be represented as:

ER Diagram with Aggregation
  • An employee works on a particular job at a particular branch.
  • An employee, branch, job combination may have an associated manager. 
Next Post Previous Post
No Comment
Add Comment
comment url