Logical Data Modeling - Composition Relationship

About

composition is a containment relationship where a content entity is a part of a container entity

This relationship is also known as:

composition is also known as physical containment because when the container is destroyed, the content entity is supposed to be destroyed (whereas in a aggregation containment it is not)

The container is said to be a composite type.

Composition aims to tackle the specialization of some entity.

It's a binary association (link between only two element).

A composition introduce a dependency relationship.

composition: same as wrapper + injection through parameters set. ?

Example

  • an engine is part of a car
  • a windows is composed of a slider, an header, a panel
  • a parent child relationship

Visualisation

Example in an class diagram

Composite Pattern


Powered by ComboStrap