\begin{frame}
\frametitle{Representing Relationship Sets}
\begin{goal}{}
A many-to-many \emph{relationship set} becomes \mpause[1]{a table with
\begin{itemize}
\item columns for the attributes of the relationship set, and
\item for the primary keys of the participating entity sets.
\end{itemize}
}
\end{goal}
\medskip
\begin{center}
\scalebox{.92}{
\begin{tikzpicture}[every edge/.style={link}]
\node[entity] (customer) {customer};
\node[attribute] (id) [above left of=customer,node distance=1.7cm,shift={(-2mm,-3mm)}] {\key{id}} edge (customer);
\node[attribute] (name) [above of=customer,node distance=1.3cm] {name} edge (customer);
\node[attribute] (street) [left of=customer,node distance=2.1cm] {street} edge (customer);
\node[attribute] (city) [below left of=customer,node distance=1.7cm] {city} edge (customer);
\node[entity,right of=customer, node distance=6cm] (loan) {loan};
\node[attribute] (loan-number) [above of=loan,node distance=1.2cm] {\key{loan-number}} edge (loan);
\node[attribute] (amount) [below right of=loan,node distance=1.7cm,xshift=-5mm] {amount} edge (loan);
\node[relationship] (does) at ($(customer)!.5!(loan)$) {borrower}
edge node [above,pos=.6] {1\sldots N} (customer)
edge node [above,pos=.6] {0\sldots M} (loan);
\end{tikzpicture}}
\end{center}
\mpause{
\centering{\small\ttfamily
\colorbox{rellight}{%
\begin{tabular}[t]{|r|r|}
\multicolumn{2}{c}{Borrower} \\ \hline
\hd{\key{id}$\;\to\;$Customer} & \hd{\key{loan-number}$\;\to\;$Loan} \\ \hline
12-0202 & L-11 \\
01-1823 & L-14 \\
22-7361 & L-17 \\
05-1912 & L-20 \\
\hline
\end{tabular}%
}}
}
\end{frame}