8/72
\begin{frame}
  \frametitle{Representing Weak Entity Sets}

  \begin{goal}{}
    A \emph{weak entity set} becomes a table that includes 
    \begin{itemize}
      \item columns for the attributes, and
      \item columns for the primary keys of the identifying entity
    \end{itemize}
  \end{goal}
  \medskip
  \pause
  
  \begin{center}
    \scalebox{.92}{{
    \begin{tikzpicture}[every edge/.style={link}]
      \node[entity] (loan) {loan};
        \node[attribute] [at=(loan),shift={(0cm,1.1cm)}] (loan-number) {\key{loan-number}} edge (loan);
        \node[attribute] [at=(loan),shift={(0cm,-1.1cm)}] (loan-amount) {loan-amount} edge (loan);

      \node[weak entity,right of=loan,node distance=7cm] (payment) {payment};
        \node[attribute] [at=(payment),shift={(0cm,1.1cm)}] (payment-number) {\disc{payment-number}} edge (payment);
        \node[attribute] [at=(payment),shift={(-1cm,-1.1cm)}] (date) {date} edge (payment);
        \node[attribute] [at=(payment),shift={(1cm,-1.1cm)}] (amount) {amount} edge (payment);

      \node[ident relationship,align=center,scale=.9] at ($(loan)!.5!(payment)$) (rel) {loan\\payment}
        edge node[above,pos=.7] {$1\sldots 1$} (loan) edge node[above,pos=.7] {$0\sldots *$} (payment);
    \end{tikzpicture}}}
  \end{center}    

  \centering{\footnotesize\ttfamily
    \colorbox{rellight}{%
      \begin{tabular}[t]{|r|r|r|r|}
        \multicolumn{4}{c}{payment}        \\ \hline
        \hd{\key{loan-number}$\to$loan} & \hd{\key{payment-number}} & \hd{date} & \hd{amount} \\ \hline 
        L-11 & 1 & 19-05-2013 & 125  \\
        L-14 & 2 & 01-02-2014 & 1000 \\
        L-17 & 1 & 05-07-2012 & 50     \\
        L-20 & 5 & 17-11-2013 & 750   \\
        \hline
      \end{tabular}%
    }}
\end{frame}