\begin{frame}
\frametitle{Composite Keys}
\begin{goal}{}
If $\{\,A,B\,\}$ is a key,
rows may agree in $A$ \emph{or} $B$, but not \emph{both}.
\end{goal}
\begin{exampleblock}{}
\centerline{%
{\tableSmall
\colorbox{rellight}{%
\begin{tabular}[t]{|r|r|r|c|}
\multicolumn{4}{c}{Students} \\ \hline
\hd{\underline{sid}} & \hd{first} & \hd{last} & \hd{address} \\ \hline
103 & Lisa & Simpson & \normalfont\ldots \\
104 & Bart & Simpson & \normalfont\ldots \\
106 & Bart & Smit & \normalfont\ldots \\
\hline
\end{tabular}%
}%
}
}
This relation
\begin{itemize}
\item \textbf{violates} the key constraint \sql{first},
\item \textbf{violates} the key constraint \sql{last},
\item but \textbf{satisfies} the key constraint $\{\, \sql{first}, \sql{last} \,\}$.
\end{itemize}
\end{exampleblock}
\pause\bigskip
\begin{quiz}{\textwidth}{Quiz}
Do all relations have a key?
\end{quiz}
\end{frame}