What is an Aggregation?
Smartpedia: Aggregation in UML is a special case of association that describes a relationship between a whole and its non-existential parts of the whole.
Aggregation as “is-part of” relationship of the UML
The term aggregation is used in many areas. In behavioral research, aggregation is an accumulation of animals caused by external (environmental) influences, in chemistry it describes the assembly of atoms to form a larger association, and in business management it is understood as a combination of individual values to form an overall value. Instead of aggregation, consolidation is often used as a synonym. In the Unified Modeling Language (UML), aggregation is a special case of association. An association describes a relationship between model elements. Aggregation – similar to composition – defines the relationship between a whole and its parts. It is therefore also referred to as the “is-part of” relationship or the “is-part-of” relation.
Example of UML Aggregation
An example: Provided that at least 3 owners take part in an owners’ meeting, this takes place a maximum of 4 times per year. The owners are therefore part of the owners’ meeting. The multiplicity of the owners’ event is 0..4, that of the owner is 3..*.
An UML aggregation is visualised with a line between the model elements and an unfilled diamond on the side of the whole.
Findings from UML aggregations
Some aspects of an aggregation can be derived from this example:
- In contrast to a composition, a part of a whole can exist without the whole. The owner, of course, remains the owner, even without an owners’ meeting taking place. The same applies to students and lectures or married couples and marriage. Generally speaking, the part of the whole does not disappear if the whole is deleted.
- An object that is part of a whole can simultaneously be part of another whole or change to another whole. Whether an existential dependency exists as in composition is not clearly defined. Without marriage (as a whole) there are also no married couples (as parts), nevertheless the persons continue to exist also without marriage. It is clearer with the owners’ meeting: An owner remains naturally owner also without owners’ meeting. In the tendency there is thus rather no existential dependence with an aggregation.
Impulse to discuss
Many software developers avoid modelling software architectures before realising them. Why is this so?
Here you can find a good German book to get started with UML.
If you like the article or would like to discuss it, please feel free to share it in your network. And if you have any comments, please do not hesitate to send us a message.
Here you will find additional information from our Smartpedia section: