15/123
\begin{frame}
  \frametitle{Relation Schema}

  \begin{block}{Relation schema}
    A \textbf{relation schema} $s$ (schema of a single relation)
    defines

    \begin{itemize}
    \item A (finite) sequence $A_1, \dots, A_n$ of distinct \textbf{attribute names}.\\
%       \hint{The names must be distinct, i.e., $A_i \neq A_j$ for $i \neq j$.}
    \smallskip
    
    \item For each attribute $A_i$ a \emph{data type} (or \textbf{domain}) $D_i$.\\
    \end{itemize}
    A relation schema can be written as
        $s = (A_1:D_1, \dots, A_n:D_n)$.
  \end{block}
  \pause
  Let $\var{dom}(A_i) = \var{val}(D_i)$ be the set of possible values for $A_i$.
  \medskip\pause
    
  \begin{exampleblock}{Creating a relation schema in SQL}
    \begin{minipage}{.53\textwidth}
    {\ttfamily\footnotesize\tableexercises}
    \end{minipage}
    \begin{minipage}{.44\textwidth}
    \begin{code}{1\textwidth}{Relation schema in SQL}
    \small
    \BUseVerbatim{createtable}
    \end{code}
    \end{minipage} 
  \end{exampleblock}
\end{frame}