\begin{frame}
\frametitle{Multi-Valued Attributes}
\begin{goal}{}
\emph{Multi-valued attribute} $A$ of an entity set $E$ is represented
by \mpause[1]{a \emph{separate table} with:
\begin{itemize}
\item columns for the primary key of $E$, and
\item a column for the attribute value
\end{itemize}
Each single value of the multi-valued attributes gets its own row.%
}
\end{goal}
\begin{center}
\scalebox{.92}{
\begin{tikzpicture}[every edge/.style={link}]
\node[entity] (customer) {customer};
\node[attribute] (id) [at=(customer),shift={(-1cm,1cm)}] {\key{id}} edge (customer);
\node[attribute] (name) [at=(customer),shift={(1cm,1cm)}] {name} edge (customer);
\node[multi attribute] (phone) [at=(customer),shift={(3.5cm,0cm)}] {phone-number} edge (customer);
\end{tikzpicture}}
\end{center}
\mpause{
\begin{center}
{\small\ttfamily
\colorbox{rellight}{%
\begin{tabular}[t]{|r|r|}
\multicolumn{2}{c}{Customer} \\ \hline
\hd{\key{id}} & \hd{name} \\ \hline
1 & Smith \\
2 & Jones \\
3 & Brown \\
4 & Ford \\
\hline
\end{tabular}%
}~\quad~%
\colorbox{rellight}{%
\begin{tabular}[t]{|r|r|}
\multicolumn{2}{c}{Phone-number} \\ \hline
\hd{\key{id}$\;\to\;$Customer} & \hd{\key{number}} \\ \hline
1 & 06-19348472 \\
1 & 0346-928475 \\
3 & 06-13783933 \\
3 & 0238-187333 \\
3 & 0192-937189 \\
\hline
\end{tabular}%
}
}
\end{center}
}
\end{frame}
\newcommand{\isaexample}{
\begin{center}
\scalebox{.8}{
\begin{tikzpicture}[every edge/.style={link},d/.style={node distance=1cm}]
\node[entity] (person) {person};
\node[attribute,right of=person,d,xshift=1cm] (name) {name} edge (person);
\node[attribute,left of=person,d,xshift=-1cm] (id) {\key{id}} edge (person);
\node[entity,at=(person),shift={(-1.5cm,-2.4cm)}] (employee) {employee};
\node[attribute,above left of=employee,node distance=1.6cm,xshift=-.5cm] (salary) {salary} edge (employee);
\node[entity,at=(person),shift={(1.5cm,-2.4cm)}] (customer) {customer};
\node[attribute,above right of=customer,node distance=1.6cm,xshift=.5cm] (credit-rating) {credit-rating} edge (customer);
\node[isa,at=(person),shift={(0cm,-0.8cm)}] {ISA} edge (person) edge (employee) edge (customer);
\end{tikzpicture}
}
\end{center}
}
\theme{ISA}