Difference between Aggregation and Association


Aggregation: Collecting or gathering of things together is called aggregation. It signifies a “has a” relationship between two related objects. We can say that there is an aggregation between two classes if object of one class has object of another and if second is a part of the first.

Association: Association reflects a binary relationship between two objects which is able to describe an activity. Relationship between object can be defined by association. For example, a bank employee can be associated with multiple clients. An organization of people with a common purpose and formal structure is represented by the term association.



Aggregation Association
1. A special type of an association which specifies a whole and part relationship is described by the term aggregation. 1. Relationship between two classes where one class use another is represented by the term association.
2. Nature is flexible. 2. Nature is inflexible.
3. Diamond shape structure is used in aggregation and it is placed next to assemble class. 3. Line segment is used between the class in association.
4. For maintaining aggregation, linkage between object is not mandatory. 4. For maintaining association, linkage between objects is needed.
5. Aggregation reflects “has a” relationship between two classes where one class contains object of another class. 5. Association reflects “has a” relationship between two classes where one class use another.




Contributed By: Romana Rahman Ema