| Author |
Message |
|
2008/03/28 18:15
|
|
|
pradeep
Joined: 2008/03/28
Messages: 1
Offline
|
|
|
|
I am having difficulty in undersand the difference between one-to-many association between two classes aggregation relationship betweeen two classes. Are they same? Can they overlap?
thanks
|
|
|
|
 |
| |
|
2008/03/31 13:33
|
|
|
LilianWong
Joined: 2008/02/22
Messages: 278
Offline
|
|
|
|
Hi pradeep,
Thanks for your post. In fact, they are not the same.
One-to-many association does not specify the characteristics of the relationship while aggregation does.
Aggregation is the part-of relationship. It's like saying that a car has an engine and wheels as its part.
I hope this explanation can help. If you have any further inquiries, please feel free to ask.
Best regards,
Lilian Wong
|
|
|
|
 |
| |
|
2008/03/31 14:54
|
|
|
|
|
Hi Wong,
If I have understood you well, then it means that if a PERSON has one-to many relationship with ADDRESS then, a PERSON's characteristic is not defined or identified by ADDRESS. So A PERSON is not an aggregation of ADDRESS while a PERSON has one-to-many relationship with ADDRESS.
Thanks for the explanation.
-pradeep
|
|
|
|
 |
| |
|
2008/04/01 15:38
|
|
|
LilianWong
Joined: 2008/02/22
Messages: 278
Offline
|
|
|
|
Hi pradeep,
Actually, aggregation specifies the characteristics of the relationship between two classes, but it is not necessary to be one-to-many relationship.
Will it be more clear? If there are any inquiries, please feel free to ask.
Best regards,
Lilian Wong
|
|
|
|
 |
| |
|
2008/04/14 04:37
|
|
|
Guruli
Joined: 2007/08/15
Messages: 7
Offline
|
|
|
|
Hi pradeep,
The easiest way to remember aggregation ist, that it shows "has-a " relationship. It can be one-one, one-many or any other relationships.
Assiziation just defines, that classes have relationship.
I hope it will help.
|
|
|
|
 |
| |
|
2008/05/16 17:06
|
|
|
|
|
|
 |
| |
|
2008/05/16 17:07
|
|
|
|
|
|
 |
| |
|
2008/05/16 17:16
|
|
|
|
|
|
 |
| |