jargon

Design patterns·Objects, messages and the principles

you deleted the order and the line items went with it, but the customer stayed, because only one of them belonged to it.

Aggregation vs composition

Also calledaggregation versus composition, owns vs references

Two shades of has-a: composition means the part's lifetime is owned by the whole and it cannot be shared, aggregation means the whole merely holds a reference to something that outlives it. The distinction is drawn as a filled or hollow diamond in UML and is worth exactly as much as the lifetime consequence — what gets deleted, what gets copied, what can be handed to two owners at once. It becomes concrete rather than academic the moment you write a delete or a deep copy.

Commonly confused with