What is Aggregation?
Aggregation in DBMS is the concept where the relation between 2 different entities is considered as a single entity. In Aggregation, a relationship with its adjacent entities is aggregated into a parent or high-level entity. In simpler terms, we can say that Aggregation is used to define relationships among relationships. It shows a ‘has-a’ or ‘is-part-of’ kind of relationship where one represents the whole and the other as part.
Example of Aggregation
For Example, An employee working on a project requires some machinery. So, REQUIRE relationship is needed between the relationship WORKS_FOR and entity MACHINERY. By using aggregation, WORKS_FOR relationship with entities EMPLOYEE and PROJECT are aggregated into a single entity. Relationship REQUIRE is created between the aggregated entity and MACHINERY.
Below there is a Visual Representation of the above Example.
Difference Between Specialization and Aggregation in DBMS
Specialization and Aggregation in Database Management Systems are the Enhanced Entity Relationship Diagrams also known as (EER-Diagram). Specialization and Aggregation in ER model are used for data abstraction in which an abstraction mechanism is used to hide details of a set of objects.