• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Association and aggregation

 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the difference between association and aggregation ?
Is Aggregation a stronger form of association?
 
Awais Bajwa
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Association is sometimes known as bidirectional relationship in which both classes know each other. Aggrigation is a kind of association in which whole/part relationship lies.
Regards
Awais
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Association is sometimes known as bidirectional relationship in which both classes know each other.

Even in aggregation both the classes can know each other and can also be able to navigate.
 
Fintan Conway
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pradeep Bhat:
What is the difference between association and aggregation ?
Is Aggregation a stronger form of association?

Aggregation is a more specialised form of association. Aggregation tells you that the relationship is a whole/part association.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Fintan Conway:

Aggregation is a more specialised form of association. Aggregation tells you that the relationship is a whole/part association.

Yes. Which actually means that there is no cycle in the object graph allowed - the whole must not be part of itself.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic