What is aggregation?

John Moore

Aggregation is a special kind of association that specifies a whole/part relationship between the aggregate (whole) and a component part. When compared to an ordinary association, some distinguishing characteristics of aggregation include:

  • aggregation is an asymmetric relationship
  • aggregation is a transitive relationship
  • aggregation implies stronger coupling
  • behavior (copy, delete, etc.) is normally propagated across an aggregation.
Since aggregation is not symmetric, it is important to visually distinguish which class is the aggregate and which is a component part. Therefore UML adorns the association line with a small open diamond at the aggregate end.

The decision to use aggregation is largely a matter of judgement. James Rumbaugh suggests that, when in doubt, use an ordinary association.