Title: Message
From the SmartDraw.com UML tutorial:
 
http://www.smartdraw.com/tutorials/software-uml/uml2.htm
 
Composition and Aggregation
Composition is a special type of aggregation that denotes a strong ownership between Class A, the whole, and Class B, its part.
 
 
Both composition and aggregation are forms of association, but not the only forms. More complete information at Wikipedia:
 
http://en.wikipedia.org/wiki/Class_diagram
 
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Bell
Sent: Friday, March 03, 2006 3:37 PM
To: [email protected]
Subject: [CFCDev] Semantics: composition, association, and aggregation

OK, I have learnt a concept and can't find a definitive agreement on the rioght words to use (try googling and you'll find the same variations). What is the definitive language for the following concepts:
 
Objects can be built up from other objects (as opposed to inheriting them) - e.g. a person can have address(es).
This can be done in two ways 
- tightly bound where one is only ever considered in the context of being a child of the other
- and loosely bound where one has a life seperate from its parent.
 
Three comments often made about tightly bound versus loosely bound:
- Tightly bound often distinguished by fact that ending the life of the parent also ends the life of the child
- Tightly bound requires a multiplicity of 1 - a child in a tightly bound relationship cannot have more than 1 parent.
- Tightly bound often technically implemented by passing a collection of actual objects whereas loosely bound is often technically implemented by passing references to the objects.
Example of tightly bound: a worm has sections (does anyone have a definitive real world example? I was thinking Person:Address, but it's not always tightly bound.)
Example of loosely bound: a student attends classes (you don't delete all the classes just because the kid drops out of college).
 
I get the concepts. What I'm finding is that different authors seem to be using the three available words (composition, association and aggregation) differently.
 
So, Which of the following is semantically correct:
(i) There are two types of composition
- aggregation where the child is only ever considered in the context of its parent
- and association where the child has a life seperate from its parent
 
OR
(ii)There are two types of association:
- composition where the child is only ever considered in the context of its parent
- and aggregation where the child has a life seperate from its parent
 
It is of more than casual interest, as it affects how you code the ORM in terms of cascading deletes as well as influencing compiler garbage collection (which I am way less interested in at the moment).
 
Definitive answers greatly appreciated!
 
Best Wishes,
Peter
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (wwwcfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to