Association is a concept in OOP to represent relationship between two/more objects in the system.
Relationship can be categorized in many aspects: form, multiplicity, directional.
There are five forms of relationship:
- Association
- is a superset of aggregation and composition
- represents "using" relationship
- Aggregation
- is a subset of association
- represents "has-a" relationship
- is a weak association
- child can exist independently of the parent
- Composition
- is a subset of association
- represents "part-of" relationship
- is a strong association
- child can not exist independently of the parent
- Dependency
- Inheritance
For multiplicity (a.k.a. cardinality) we have:
- one-to-one
- one-to-many
- many-to-many
For directional we have:
- Unidirectional
- Bidirectional