16/75
\begin{frame}
  \frametitle{Eliminating Tables}

  \begin{goal}{}
  \emph{Many-to-(zero or)one} relations can be represented by:%
  \mpause[1]{
  \begin{itemize}
    \item adding an extra extra attribute/column to the many-side 
      with the primary key of the one-side
  \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] (account) {account};
      \node[attribute] (account-number) [above of=account,node distance=1.2cm] {\key{account-number}} edge (account);
      \node[attribute] (balance) [below right of=account,node distance=1.7cm,xshift=-5mm] {balance} edge (account);

      \node[relationship] (does) at ($(customer)!.5!(account)$) {depositor} edge node [above,pos=.5,inner sep=0.5mm] {$1\sldots 1$} (customer) edge node [above,pos=.6] {$0\sldots *$} (account);
    \end{tikzpicture}}
  \end{center}

  \mpause{    
  For example, instead of creating a table for the relationship set \textit{depositor},
  add a the attribute \textit{id} of \textit{customer} to \textit{account}.

  \centering{\small\ttfamily
    \colorbox{rellight}{%
      \begin{tabular}[t]{|r|r|r|}
        \multicolumn{3}{c}{Account}        \\ \hline
        \hd{id$\;\to\;$Customer} & \hd{\key{account-number}} & \hd{balance} \\ \hline 
        12-0202 & 83828 & 125  \\
        01-1823 & 29281 & 1000 \\
        \hline
      \end{tabular}%
    }}
    }
\end{frame}