DBMS Generalization
DBMS Generalization
Generalization is a process in which the common attributes of more than one entities form a
new entity. This newly formed entity is called generalized entity.
These two entities have two common attributes: Name and Address, we can make a generalized
entity with these common attributes. Lets have a look at the ER model after generalization.
Note:
1. Generalization uses bottom-up approach where two or more lower level entities combine
together to form a higher level new entity.
2. The new generalized entity can further combine together with lower level entity to create a
further higher level generalized entity.
DBMS Specialization
Specialization is a process in which an entity is divided into sub-entities. You can think of it as a
reverse process of generalization, in generalization two entities combine together to form a new
higher level entity. Specialization is a top-down process.
The idea behind Specialization is to find the subsets of entities that have few distinguish
attributes. For example – Consider an entity employee which can be further classified as sub-
entities Technician, Engineer & Accountant because these sub entities have some distinguish
attributes
In the above diagram, we can see that we have a higher level entity “Employee” which we have divided
in sub entities “Technician”, “Engineer” & “Accountant”. All of these are just an employee of a company,
however their role is completely different and they have few different attributes. Just for the example, I
have shown that Technician handles service requests, Engineer works on a project and Accountant
handles the credit & debit details. All of these three employee types have few attributes common such
as name & salary which we had left associated with the parent entity “Employee” as shown in the above
diagram.
DBMS Aggregration
Aggregation is a process in which a single entity alone is not able to make sense in a relationship so the
relationship of two entities acts as one entity. I know it sounds confusing but don’t worry the example
we will take, will clear all the doubts.
In real world, we know that a manager not only manages the employee working under them but he has
to manage the project as well. In such scenario if entity “Manager” makes a “manages” relationship with
either “Employee” or “Project” entity alone then it will not make any sense because he has to manage
both. In these cases the relationship of two entities acts as one entity. In our example, the relationship
“Works-On” between “Employee” & “Project” acts as one entity that has a relationship “Manages” with
the entity “Manager”.