Aggregations and compositions

Aggregation is a strong form of association that represents a part/whole relationship, as with a car (whole) that has wheels (parts). The parts can have a life of their own, and do not necessarily come into being and die with the creation and destruction of the whole (for example, the wheels can be removed and reused on another car before the original car is junked).

Aggregations are implemented as "shared" aggregations in IBM® Rational® Rhapsody®, in that a part can be simultaneously aggregated by several wholes because it is not physically embedded inside any of them. Composition is an even stronger form of "non‑shared" aggregation, in which the part is embedded inside the whole and comes into begin and dies with its creation and destruction.

The rules for implementing aggregations (that are not compositions) as either pointers or containers depending on the multiplicity and ordering of the relation are the same for aggregations as for associations.


Feedback