\begin{frame}
\frametitle{Minimality of Keys}
\begin{exampleblock}{}
\begin{minipage}{.4\textwidth}
\centerline{%
\ttfamily\small
\colorbox{rellight}{%
\begin{tabular}[t]{|r|r|r|}
\multicolumn{3}{c}{Students} \\ \hline
\hd{\underline{sid}} & \hd{first} & \hd{last} \\ \hline
103 & Lisa & Simpson \\
104 & Bart & Simpson \\
106 & Bart & Smit \\
\hline
\end{tabular}%
}
}
\end{minipage}
\begin{minipage}{.59\textwidth}
What keys satisfy the key constraints?\vspace{-.75ex}%
\begin{itemize}\setlength{\itemsep}{-.5ex}
\pause
\item \{\sql{sid}\} \onslide<9->{\alert{minimal}}
\pause
\item \{\sql{first}, \sql{last}\} \onslide<9->{\alert{minimal}}
\pause
\item \{\sql{sid}, \sql{first}\}
\pause
\item \{\sql{sid}, \sql{last}\}
\pause
\item \{\sql{sid}, \sql{first}, \sql{last}\}
\end{itemize}
\end{minipage}
\end{exampleblock}
\pause\medskip
\begin{block}{Implication between key constraints}
If $A$ is a key and $A \subsetneq B$, then $B$ is also a key. \\
The key $B$ is \emph{weaker} (more database states are valid) than $A$.
\end{block}
Any superset of a key is itself a key.
\pause\medskip
\begin{goal}{}
A key $\{A_1, \dots, A_k\}$ is \textbf{minimal} if no proper subset is a key.\\
\end{goal}
\pause\pause
In the literature, often keys are required to be minimal.
\end{frame}