mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-09-10 13:05:24 +02:00
[DMDB] Improve normal forms section
This commit is contained in:
Binary file not shown.
@@ -3,9 +3,8 @@ In the first normal form, only atomic domains are allowed, i.e. keys are not all
|
|||||||
|
|
||||||
\inlineintuition This makes the concept of a key easier to define, or well defined
|
\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 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.
|
This can cause some issues when updating.
|
||||||
|
|
||||||
|
However, some \sql\ flavours support arrays. However, the semantics and the support varies.
|
||||||
Arrays are very tempting to use if we have an unknown and variable number of different data points for a field.
|
Arrays are very tempting to use if we have an unknown and variable number of different data points for a field.
|
||||||
|
|||||||
@@ -13,4 +13,4 @@ For a relation to be in 2NF, every non-key attribute needs to minimally dependen
|
|||||||
If relations are not in 2NF, they may experience insert, update and delete anomalies,
|
If relations are not in 2NF, they may experience insert, update and delete anomalies,
|
||||||
which can lead to incorrect, redundant or inconsistent updates of the relations.
|
which can lead to incorrect, redundant or inconsistent updates of the relations.
|
||||||
|
|
||||||
However, some relations can still suffer from update and / or delete anomalies
|
However, some relations can still suffer from update and / or delete anomalies. One such example is a non-key Functional Dependency.
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
\subsubsection{Overview}
|
\subsubsection{Overview}
|
||||||
|
\label{sec:nf-overview}
|
||||||
This overview is adapted from \hlhref{https://en.wikipedia.org/wiki/Database_normalization\#Normal_forms}{this Wikipedia article}.
|
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,
|
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}
|
also known as \textit{key attributes}
|
||||||
@@ -17,3 +18,6 @@ also known as \textit{key attributes}
|
|||||||
& \cross & \cross & \cross & \cross & \checkmark \\
|
& \cross & \cross & \cross & \cross & \checkmark \\
|
||||||
\end{tables}
|
\end{tables}
|
||||||
This means that a relation in BNCF is free of redundancies based on functional dependencies.
|
This means that a relation in BNCF is free of redundancies based on functional dependencies.
|
||||||
|
|
||||||
|
Note that the above table needs to be read vertically, i.e. for UNF only Unique Rows needs to be satisfied,
|
||||||
|
thus it doesn't mean that if we have Scalar Columns that this isn't allowed in UNF. In fact, it is allowed, as it is a more strict property.
|
||||||
|
|||||||
Reference in New Issue
Block a user