Skip to main content

Generalization

Generalization is the opposite of specialization. It is the process of combining two or more lower-level entities into a higher-level entity (superclass) based on their common attributes.

  • It answers the question: “What common entity can these subtypes belong to?”
  • It is a bottom-up approach.

Key Points:

  1. Bottom-up approach (starts with specific entities and abstracts them into a generalized entity).
  2. Used when multiple entities share common attributes.
  3. Avoids redundancy by placing shared attributes in the generalized superclass.

Example

Suppose we have two entities:

  • Car → attributes: Car_ID, Model, Color
  • Bike → attributes: Bike_ID, Model, Color

Both share common attributes: Model, Color. Instead of keeping them separately with redundant attributes, we can create a generalized entity:

  • Superclass → Vehicle (Vehicle_ID, Model, Color)
  • Subclasses → Car, Bike

ER Representation (textual):

       Car         Bike
(Car_ID, ...) (Bike_ID, ...)
\ /
\ /
Vehicle
(Vehicle_ID, Model, Color)

Here, Generalization merges Car and Bike into a general entity Vehicle.

Difference Between Specialization and Generalization

AspectSpecializationGeneralization
ApproachTop-down (from general to specific)Bottom-up (from specific to general)
PurposeTo create subtypes with distinct attributesTo merge common attributes into a single entity
ExampleEmployee → FullTime, PartTimeCar + Bike → Vehicle
Relationship type“IS-A” (Employee is a FullTime)“IS-A” (Car is a Vehicle)