mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-09-10 19:15:25 +02:00
[DMDB] Quick overview corrections
This commit is contained in:
@@ -27,6 +27,7 @@ Finally, we remove all redundant FDs.
|
||||
Below a short explanation as to how to check if a given relation is in any of the normal forms.
|
||||
A relation being in a NF further down the list implies it also is in the above,
|
||||
whereas a relation \textit{not} being in a higher up the list NF implies it isn't in the further below.
|
||||
Note that the former is implied by the definition of each normal form, in that each requires the DB to be in the previous NF, as well as fulfilling the following conditions:
|
||||
\begin{itemize}
|
||||
\item \bi{1NF}: Each attribute cannot contain further tables or arrays (this is very commonly given in the tasks)
|
||||
\item \bi{2NF}: Determine the candidate keys. Then for each non-prime attribute (i.e. attribute not part of any candidate key) determine if it depends on
|
||||
@@ -46,7 +47,7 @@ This means that for determining if a relation is in 3NF or BCNF, we need to be a
|
||||
This algorithm works as follows:
|
||||
\begin{enumerate}
|
||||
\item Compute the minimal cover
|
||||
\item Create a relation for each FD $\alpha \rightarrow \beta$ by defining it as $\cR_i = \alpha \cup \beta$
|
||||
\item Create a relation for each FD $\alpha \rightarrow \beta$ of the minimal cover by defining it as $\cR_i = \alpha \cup \beta$
|
||||
\item If no relation $\cR_i$ contains a superkey, add a relation based on a superkey (or better a candidate key)
|
||||
\item Finally, remove redundant relations, i.e. ones that share the same superkey by combining them
|
||||
(e.g. with the example from minimal cover, we would end up with relations $(A, B, C, D)$ and $(A, B, C, E)$, combine them $(A, B, C, D, E)$)
|
||||
|
||||
Reference in New Issue
Block a user