[DMDB] Intuition for FD and NF

This commit is contained in:
2026-07-31 12:20:11 +02:00
parent 9cec2e1028
commit 547a1e279f
7 changed files with 37 additions and 3 deletions
@@ -1,3 +1,4 @@
\newpage
\subsubsection{Closure Algorithm}
For the definition of the closure, see above.
@@ -0,0 +1,13 @@
\subsubsection{Intuition}
Adapted from the \hlhref{https://en.wikipedia.org/wiki/Functional_dependency}{Wikipedia Article on this topic}
The idea of functional dependencies is to describe which attributes belong to the \textit{determinant set} $X$ and which belong to the \textit{dependent set} $Y$.
The values of the attributes in the \textit{determinant set} determine the values of $Y$.
Thus, for a relation $R$, with $X, Y \subseteq R$, with $X \rightarrow Y$:
\begin{itemize}
\item When attributes $X$ have known values (let's call them $\bm{x}$),
then the values of for their corresponding $Y$ attributes can be determined by looking them up in \bi{any} tuple of $R$ containing the values $\bm{x}$
\item Two tuples sharing the same values of $X$ share the same values of $Y$.
\end{itemize}
A FD $X \rightarrow Y$ is \textit{trivial}, if $Y \subseteq X$
@@ -1,4 +1,4 @@
\subsection{Second Normal Form}
\subsubsection{Second Normal Form}
% The two dependencies $\{ \text{Legi}, \text{Nr} \} \rightrightarrow \{ \text{Name}, \text{Semester} \}$,
% $\{ \text{Legi} \} \rightrightarrow \{ \text{Name}, \text{Semester} \}$ state the following:
%
@@ -0,0 +1,18 @@
\subsubsection{Overview}
This overview is adapted from \hlhref{https://en.wikipedia.org/wiki/Database_normalization\#Normal_forms}{this Wikipedia article}.
All constraint definitions in {\scriptsize smaller font} are informal. Note that \textit{prime attributes} are the attributes that make up a candidate key,
also known as \textit{key attributes}
\newcommand{\cross}{\ding{55}}
\begin{tables}{p{10cm}lllll}{Constraint & UNF & 1NF & 2NF & 3NF & BCNF}
Unique rows {\scriptsize (no duplicates)}
& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark \\
Scalar Columns {\scriptsize (Columns can't contain relations or composite values)}
& \cross & \checkmark & \checkmark & \checkmark & \checkmark \\
Every non-prime attribute has a full FD on each candidate key {\scriptsize (Attributes depend on the whole of every key)}
& \cross & \cross & \checkmark & \checkmark & \checkmark \\
Every Non-trivial FD begins either with superkey or ends with prime attribute {\scriptsize (Attributes depend only on candidate keys)}
& \cross & \cross & \cross & \checkmark & \checkmark \\
Every non-trivial FD begins with a superkey
& \cross & \cross & \cross & \checkmark & \checkmark \\
\end{tables}
@@ -7,6 +7,7 @@
\input{parts/02_theory-background/00_functional-dependencies/03_other-rules.tex}
\input{parts/02_theory-background/00_functional-dependencies/04_closure.tex}
\input{parts/02_theory-background/00_functional-dependencies/05_using.tex}
\input{parts/02_theory-background/00_functional-dependencies/06_intuition.tex}
% \input{parts/02_theory-background/00_functional-dependencies/}
\input{parts/02_theory-background/01_normal-forms/00_intro.tex}
@@ -16,6 +17,7 @@
\input{parts/02_theory-background/01_normal-forms/04_bncf.tex}
\input{parts/02_theory-background/01_normal-forms/05_decomposition-algorithm.tex}
\input{parts/02_theory-background/01_normal-forms/06_synthesis-algorightm.tex}
\input{parts/02_theory-background/01_normal-forms/07_overview.tex}
% \input{parts/02_theory-background/01_normal-forms/}
% \input{parts/02_theory-background/}