\begin{frame}
\frametitle{3NF Synthesis Algorithm}
\begin{goal}{}
The \emph{3NF synthesis algorithm} produces a lossless decomposition of a relation into 3NF that \emph{preserves the FDs}.
\end{goal}
\pause
\begin{block}{3NF Synthesis Algorithm}
\emph{Input:} relation $R$ and a set of FDs for $R$.
\begin{enumerate}
\smallskip
\item Compute a \emph{canonical set} of FDs $\mathcal{F}$.
\smallskip
\item \textbf{Merge} $\alpha \to \beta_1$ and $\alpha \to \beta_2$ with the \emph{same left-hand side}
in $\mathcal{F}$ to the single functional dependency $\alpha \to \beta_1 \cup \beta_2$ .
\smallskip
\item For all $\alpha \to \beta \in \mathcal{F}$ \emph{create a relation} with attributes $\alpha \cup \beta$.
%$\mathcal{A} = \alpha \cup \{ B\,|\, \alpha \to B \in \mathcal{F}\}$.
\smallskip
\item If none of the created relations contains a \emph{key of $R$},
add a relation with the attributes of a minimal key of $R$.
\smallskip
\item Finally, drop relations $R_i(\alpha)$ if there is $R_j(\beta)$ with $\alpha \subsetneq \beta$.
\medskip
\end{enumerate}
\end{block}
\end{frame}