Extended E-R Model
Last updated
Was this helpful?
Last updated
Was this helpful?
In the Entity-Relationship (ER) model of database design, Generalization, Specialization, and Aggregation are three important concepts used to model relationships and hierarchies among entities. Let's explore each of these concepts:
In ER model, we may require to subgroup an entity set into other entity sets that are distinct in some way with other entity sets.
Specialisation is splitting up the entity set into further sub entity sets on the basis of their functionalities, specialities and features.
It is a Top-Down approach.
e.g., Person entity set can be divided into customer, student, employee. Person is superclass and other specialised entity sets are subclasses.
We have “is-a” relationship between superclass and subclass.
Depicted by triangle component.
Why Specialisation ?
Certain attributes may only be applicable to a few entities of the parent entity set.
DB designer can show the distinctive features of the sub entities.
To group such entities we apply Specialisation, to overall refine the DB blueprint.
It is just a reverse of Specialisation.
2. DB Designer, may encounter certain properties of two entities are overlapping. Designer may consider to make a new generalised entity set. That generalised entity set will be a super class.
3. “is-a” relationship is present between subclass and super class.
4. e.g., Car, Jeep and Bus all have some common attributes, to avoid data repetition for the common attributes. DB designer may consider to Generalise to a new entity set “Vehicle”.
5. It is a Bottom-up approach. 6. Why Generalisation?
Makes DB more refined and simpler.
Common attributes are not repeated
Both Specialisation and Generalisation, has attribute inheritance.
The attributes of higher level entity sets are inherited by lower level entity sets.
E.g., Customer & Employee inherit the attributes of Person.
If a parent entity set participates in a relationship then its child entity sets will also participate in that relationship
In aggregation, the relation between two entities is treated as a single entity. In aggregation, relationship with its corresponding entities is aggregated into a higher level entity.
For example: Center entity offers the Course entity act as a single entity in the relationship which is in a relationship with another entity visitor. In the real world, if a visitor visits a coaching center then he will never enquiry about the Course only or just about the Center instead he will ask the enquiry about both.
In summary, Generalization, Specialization, and Aggregation are essential concepts in the ER model for modeling relationships, hierarchies, and complex structures in a database schema. They help in creating more organized, efficient, and semantically rich database designs that accurately represent real-world scenarios.