Aggregation in ER Diagram with example


Aggregation is the process of compiling information on an object, thereby abstracting a higher level object. One limitation of the E-R model is that it can’t express relationships within relationships. To illustrate the need for such a construct, consider the ternary relationship works_on between an employee, branch and job as shown in the below figure:

Thus, the relationship set works_on relating the entity sets Employee, Branch and Job is a higher level entity set. Such an entity set is treated in the same manner as in any other entity set. We can then create a binary relationship between Managers between works_on and Managers to represent who manages what tasks.


In object-oriented system development, objects are categorized according to classes and subclasses. Identifying classes realizes numerous benefits. For example, consider the fact that a new attribute of interest called gender, needs to be added to teacher and student objects. Because the attribute is common to both, the attribute could be added once with the class person implying both objects within its class share that attribute.