\begin{frame} \frametitle{Cardinalities and Constraints} When translating entity sets and relationship sets to tables: \begin{itemize} \item every table should have a \emph{primary key} (if possible) \item declared \emph{foreign key constraints} for each relation \end{itemize} \pause\medskip \begin{goal}{} Foreign keys should be declared \begin{itemize} \item \emph{not null}, or not, \item \emph{unique}, or not, \end{itemize} \emph{to model the cardinality limits} as good as possible. \end{goal} \pause \begin{exampleblock}{} All columns in tables from relationship sets are \textit{not nullable}.\\ \remark{Each row is a relationship among all participating entity sets.} \end{exampleblock} \pause\medskip \begin{goal}{} Attributes should be declared \emph{not null} and/or \emph{unique} if appropriate. \end{goal} \end{frame}