[DMDB] Basics of first and second normal form

This commit is contained in:
2026-06-24 16:05:38 +02:00
parent 3cca730b92
commit 4b4b74fcb6
2 changed files with 20 additions and 0 deletions
@@ -1 +1,11 @@
\subsubsection{First Normal Form} \subsubsection{First Normal Form}
In the first normal form, only atomic domains are allowed.
\inlineintuition This makes the concept of a key easier to define, or well defined
Some \sql\ flavours support arrays. However, the semantics and the support varies
This can come in handy to solve one to many relationships, but what if many different persons have the same elements there?
This can cause some issues when updating.
Arrays are very tempting to use if we have an unknown and variable number of different data points for a field.
@@ -0,0 +1,10 @@
\subsection{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:
\begin{itemize}
\item Legi determines the name and semester of a student.
\item The first map has to happen, even though mapping $\{ \text{Legi}, \text{Nr} \}$ to $\{ \text{Legi} \}$ would be enough. We thus will have redundancy.
However, this is the exact relationship that the table is meant to capture
Thus, $\{ \text{Name}, \text{Semester} \}$ should not be in the table at all.
\end{itemize}