Skip to content
We areTOP 1%

What are generalization, specialization and aggregation in the ER model?

MediumConceptER Model
Track your progress
First attempt
Re-solve after a few days
Final pass before interviews

Answer

These are extended ER (EER) features used to model hierarchies of entities and relationships between relationships.

  • Generalization is bottom-up: the common attributes of several entity sets are combined into a higher-level entity. Car and Bike share reg_no and colour, so they are generalized into Vehicle.
  • Specialization is top-down: an entity set is divided into sub-groups with their own attributes. Employee is specialized into Engineer (with skill) and Manager (with budget). Both create an "is-a" hierarchy in which subclasses inherit the superclass attributes.
  • Aggregation treats a relationship, together with the entities it connects, as one higher-level entity, so that it can take part in another relationship.

Example: Employee works on Project, and a Machine is used by a particular employee-project pair. A plain ER diagram cannot connect an entity to a relationship, so the box around (Employee - works on - Project) is treated as one entity, and uses links Machine to that box. As a table: uses(emp_id, project_id, machine_id).

More in ER Model

Sign in to track your progress

Your checkboxes, streak and activity heatmap are saved to your account and sync across devices. It is free.
Sign in with email

New here? Create an account