\begin{frame} \frametitle{UML: Aggregation and Composition} \begin{goal}{Aggregation in UML} \begin{center} \begin{tikzpicture} \umlclass{system}{ +name \\ +location }{ } \umlclass[x=7]{component}{ +type \\ +model \\ + serialNumber }{ } \umluniaggreg[arg2=$1..*$,mult2=$\,$,pos2=0.9]{system}{component} \end{tikzpicture} \vspace{-2ex} \end{center} \begin{itemize} \item \emph{Aggregation:} system is a collection of components \medskip \item \emph{Composition:} if the diamond would be filled black, it would mean that every component belongs to one system ($1..1$) \end{itemize} \end{goal} \pause \begin{alertblock}{} It is important to note the difference with ER models: \begin{itemize} \item In ER aggregation allows to treat relations as entities. \item Composition in UML is similar to weak entities in ER.\\ \remark{However, composition in UML says nothing about keys.} \end{itemize} \end{alertblock} \end{frame}