\begin{frame}
\frametitle{Multiple Keys}
A relation may have \textbf{more than one minimal key}.
\begin{goal}{}
In the relational model, one key is designated as
\textbf{primary key.} A primary key \textbf{cannot be null.}
\end{goal}
All other keys are called \textbf{alternate} or \textbf{secondary keys.}
\pause\medskip
\begin{exampleblock}{}
The primary key attributes are often marked by \textbf{underlining}: % them in the relation schema specifications:\vspace{-.5ex}
\begin{talign}
R(\underline{A_1}, \dots, \underline{A_k}, A_{k+1},\dots,A_n)
\end{talign}
Here $\{\, A_1,\ldots,A_k \,\}$ is the primary key of $R$.
\end{exampleblock}
\pause\medskip
It is good design practice to define a primary key that
\begin{itemize}
\item
consists of a \textbf{single (simple) attribute} only,
\item
is \textbf{never updated}.
% \pause
% \item better for indexing and retrieving items
\end{itemize}
\smallskip
This is good for
\begin{itemize}
\item consistency (applications might store the key), and
\item indexing and retrieving items.
\end{itemize}
% \begin{quiz}{0.9\textwidth}{Primary keys}
% What might be the rationale behind this design advice?
% \end{quiz}
\medskip
\vspace{10cm}
\end{frame}