28/36
\begin{frame}[fragile]
  \frametitle{SQL DDL (Data Definition Language)}
  
  \begin{code}{\textwidth}{Creating a table with constraints}
{\small
%###
\begin{verbatim}
create table Solved (
  id       int          auto_increment,
  name     varchar(40)  not null,
  homework numeric(2,0) not null,
  points   numeric(2,0) not null check (points <= 10),
  primary key (id)
); 
\end{verbatim}
%###
}
  \end{code}
  Note the data types and constraints!

  \begin{center}
  \scalebox{.8}{
  \begin{tabular}{| c | c | c | c |}
  \rowcolor{mblue!20}
  \mc{4}{Solved} 
  \\ \hline \rowcolor{mblue!40}
  \ul{id}  & name & homework & points 
  \\ \hline 
  \end{tabular}
  }
  \end{center}
  \pause
  
  \begin{exampleblock}{Creating a view}
{\small
%###
\begin{verbatim}
create view SolvedHomework as
    select id, name, homework 
    from   Solved;
\end{verbatim}
%###
}
  \end{exampleblock}
\end{frame}