Composition
- Tags
- modelling
Is a relationship between 2 entities expressing a [see page 23, whole-parts] relationship where the parts depend on the owning whole. If the whole is broken down the parts cease to exist.
\begin{figure}
\centering
\begin{tikzpicture}
\umlclass{Order}{
orderNumber: Integer \\
date: Date}{};
\umlclass[y=-5]{OrderLine}{
productCode: Integer \\
quantity: Integer \\
price: Real}{};
\umlaggreg[attr2=lines|1..*]{Order}{OrderLine};
\end{tikzpicture}
\caption{Example of a composition relationship. Individual order-lines cannot exist
without the owning order.}
\end{figure}