[DMDB] Completed normal forms, start query optimization

This commit is contained in:
2026-06-30 16:21:35 +02:00
parent 4b4b74fcb6
commit 59e4bcd5e9
19 changed files with 168 additions and 13 deletions
@@ -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}