Categories
Association | Aggregation | Composition |
Association relationship is denoted using an arrow. | Aggregation relationship is denoted using a straight line with an empty arrowhead at one end. | Composition relationship is denoted using a straight line with a filled arrowhead at any one of the ends. |
Association can exist between two or more classes in UML. | Aggregation is a part of an association relationship. | The composition is a part of an association relationship. |
There can be one-one, one-many, many-one, and many-many association present between the association classes. | Aggregation is considered as a weak type of association. | The composition is considered as a strong type of association. |
In an association relationship, one or more objects can be associated with each other. | In an aggregation relationship, objects that are associated with each other can remain in the scope of a system without each other. | In a composition relationship, objects that are associated with each other cannot remain in the scope without each other. |
Objects are linked with each other. | Linked objects are not dependent upon the other object. | Objects are highly dependent upon each other. |
In UML Association, deleting one element may or may not affect another associated element. | In UML Aggregation, deleting one element does not affect another associated element. | In UML Composition, deleting one element affects another associated element. |