In this post, we will understand the difference between Aggregation and Composition.
It tells about a mixture.
It is a way to wrap the simple objects/data types into a single unit.
It is considered as a strong association.
A parent entity owns a child entity.
The child entity doesn’t have its own lifetime.
It is represented using a diamond that is filled.
It tells about a collection.
It is different from ordinary composition.
It doesn’t imply any ownership.
It is considered as a weak association.
In this, the parent entity has a ‘HAS – A’ relationship with the child entity.
It is represented using a diamond that is empty.