Table of Contents

About

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:

Type

Physical

physical containment called composition where the content object cannot exist without its container. (ie when applied in a software, the content object will be destroyed with its container - also called a cascade delete)

Example:

  • a car and an engine
  • parent child relationship

Catalog

catalog containment called aggregation where the content object can exist without its container (ie when the container is destroyed, the content objects will not)

Example: a class and its student