mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-07-28 03:39:08 +02:00
[DMDB] Completed normal forms, start query optimization
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
\subsection{Functional Dependency}
|
||||
\label{sec:functional-dependency}
|
||||
As with relational algebra, we again define a schema to be a relation, e.g. $\cR(A:D_A, B:D_B, C:D_C, D: D_D)$,
|
||||
with an instance of it being $R \subseteq D_A \times D_B \times D_C \times D_D$.
|
||||
|
||||
@@ -12,9 +13,10 @@ and $R \vdash \alpha \rightarrow \beta$ if the same applies syntactically (i.e.
|
||||
\inlineintuition This means that there is a function that maps the values of columns $\alpha$ to the values of columns $\beta$.
|
||||
|
||||
|
||||
\inlinedefinition $\alpha \subseteq \R$ is a \bi{superkey} if and only if $\alpha \rightarrow \cR$.
|
||||
\inlinedefinition $\alpha \subseteq \R$ is a \gls{superkey} if and only if $\alpha \rightarrow \cR$.
|
||||
|
||||
\inlineintuition This means that if we know the values of columns $\alpha$, we know the value of the rest of the columns in $\cR$
|
||||
\inlineintuition This means that if we know the values of columns $\alpha$, we know the value of the rest of the columns in $\cR$.
|
||||
It is a superset of some candidate keys (see \ref{sec:relations-keys})
|
||||
|
||||
|
||||
\inlinedefinition $\alpha \rightarrow \beta$ is minimal if and only if $\forall A \in \alpha : (\alpha - \{ A \}) \centernot{\rightarrow} \beta$.
|
||||
|
||||
@@ -26,7 +26,7 @@ We can use that to check the following:
|
||||
\item $F \vdash \alpha \rightarrow \gamma$: Calculate $\alpha^+$ and check $\gamma \in \alpha^+$
|
||||
\item $F \vdash G$: For each $\alpha \rightarrow \gamma \in G$, check $F \vdash \alpha \rightarrow \gamma$
|
||||
\item $F$ equivalent to $G$: Check $F \vdash G$ and $G \vdash F$
|
||||
\item $K \subseteq \cR$ superkey for $F$: Check $F \vdash K \rightarrow \cR$:
|
||||
\item $K \subseteq \cR$ \gls{superkey} for $F$: Check $F \vdash K \rightarrow \cR$:
|
||||
\end{itemize}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user