19/36
\begin{frame}[fragile]
  \frametitle{Relational Model: Schema}
  
  \begin{block}{Database schema}
    = structure of the database, that is, relations + constraints
  \end{block}
  
  \begin{exampleblock}{Example schema}
      \begin{itemize}
        \item Customers(\ul{id}, name, street, city) 
        \item Accounts(depositor $\to$ Customers(id), \ul{accountnr})
      \end{itemize}
  \end{exampleblock}
  \medskip
  
  \begin{block}{Database instance}
    = actual content (`state') of the database at some moment
  \end{block}  
  \vspace{-.5ex}
  \begin{exampleblock}{Example instance}
    \scalebox{.8}{
    \begin{tabular}{| c | c | c | c |}
    \rowcolor{mblue!20}
    \mc{4}{Customers} 
    \\ \hline \rowcolor{mblue!40}
    \ul{id}  & name & street & city 
    \\ \hline \rowcolor{mblue!20}
    191 & George & 1 Main & London
    \\ \hline \rowcolor{mblue!20}
    239 & Lisa & 5 North & New York
    \\ \hline 
    \end{tabular}
    }
    \hfill%
    \scalebox{.8}{
    \begin{tabular}{|c|c|}
    \rowcolor{mblue!20}
    \mc{2}{Accounts} 
    \\ \hline \rowcolor{mblue!40}
    depositor  & \ul{accountnr} 
    \\ \hline \rowcolor{mblue!20}
    191 & 101
    \\ \hline \rowcolor{mblue!20}
    239 & 205
    \\ \hline 
    \end{tabular}
    }
  \end{exampleblock}
\end{frame}

\theme{Structured Query Language}