# Logical Data Modeling - Composition Relationship

composition is a containment relationship of physical type where the content entity is a part of a container entity

This relationship is also known as:

• a whole/part relationship (ie whole/component)

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

Discover More
Bootstrap - Tab

tab in Bootstrap are composed of: two HTML elements: the triggers element: the navigational tab that are clicked the target element: the pane that contains the content a javascript object instance...
Class - Composition (Composite | Component)

A composition relationship Composition is better than inheritance See: - 2.5.1 - p207 (for the composite figure)...
Code - Functional programming (FP) - Collection Operations

Functional programming (FP) defines standard operations on collections. It is a declarative paradigm that treats computation as the evaluation of mathematical functions. Most of the operations, you perform...
Data Processing - (Pipeline | Compose | Chain)

A pipeline is a finite automata where: the data transition from one state to another via a series of transformations (work) A pipeline creates a composition relationship. A pipeline is also...
Logical Data Modeling - Aggregation (Collection)

aggregation is a containment relationship where one or more entities are part of a container entity. In other word, aggregation is combining multiple pieces of data into one unit. The container entity...
Logical Data Modeling - Association

An association is a relationship between two or more entities. It's represented by a link in the data model. An association: answers to the question why two entity need to know one another. specifies...
Logical Data Modeling - Container

A container is an element that contains others elements. It creates a containment relationship between the element that can be: (hierarchy) or (collection)
Logical Data Modeling - Containment relationship

A containement is a type of relationship between a container element and a content element that model a has a relationship There is two type of containment: physical (composition) aims to build an...
Logical Data Modeling - Group (Grouping)

group (or grouping) refers to the fact of putting things (elements) together in a container. This is a one-to-many relationship. In data modeling, you group: attributes in: an entity a relationship...
Pipe operator

x %>% f, rather than f(x). A pipe is a control operator. One or more pipe operators in a command forms a pipeline. The pipe operator is the basis component of a stream It's creating a composition...