Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

When is shared aggregation a weak form of aggregation?


Asked by Rhea Knox on Nov 28, 2021 FAQ



It is a "weak" form of aggregation when part instance is independent of the composite. Shared aggregation has the following characteristics: it is asymmetric - only one end of association can be an aggregation,
Also,
Aggregation is a weak Association. Composition is a strong Association. Aggregation means one object is the owner of another object. Composition means one object is contained in another object. The direction of a relation is a requirement in both Composition and Aggregation.
Likewise, The Aggregation is a metaterm in the UML standard, and means BOTH composition and shared aggregation, simply named shared. Too often it is named incorrectly "aggregation". It is BAD, for composition is an aggregation, too. As I understand, you meant you understand "shared aggregation and composition".
Just so,
Composition from A to B is like Aggregation, where B cannot be shared and if A is deleted, all of its aggregates ( B s) are deleted also. Aggregation is an Association relationship where the Association can be considered the containing class 'Owning' the contained class, and the lifetime of that relationship is not defined.
Moreover,
In your modeling, when you create an Aggregation relationship it defaults to the weak (shared) form of the relationship, represented by a hollow diamond head. You can change this to the strong form (Composition), represented by a solid black diamond head. Right-click on an Aggregation connector to display the context menu.