diff --git a/semester4/dmdb/data-modelling-databases-summary.pdf b/semester4/dmdb/data-modelling-databases-summary.pdf index eb5aa93..94c3a01 100644 Binary files a/semester4/dmdb/data-modelling-databases-summary.pdf and b/semester4/dmdb/data-modelling-databases-summary.pdf differ diff --git a/semester4/dmdb/parts/03_systems/00_query-optimization/01_search-space/01_rewriting-rules.tex b/semester4/dmdb/parts/03_systems/00_query-optimization/01_search-space/01_rewriting-rules.tex index e7aed86..afafc6f 100644 --- a/semester4/dmdb/parts/03_systems/00_query-optimization/01_search-space/01_rewriting-rules.tex +++ b/semester4/dmdb/parts/03_systems/00_query-optimization/01_search-space/01_rewriting-rules.tex @@ -33,7 +33,7 @@ The following rules were discussed in the lectures: \item Natural join operations are associative, so are theta joins (with restrictions) \[ (E_1 \bowtie E_2) \bowtie E_3 = E_1 \bowtie (E_2 \bowtie E_3) - \qquad (E_1 \bowtie_{\theta_1} E_2) \bowtie_{\theta_2 \land \theta_3} = E_1 \bowtie_{\theta_1 \land \theta_3} (E_2 \bowtie_{\theta_2} E_3) + \qquad (E_1 \bowtie_{\theta_1} E_2) \bowtie_{\theta_2 \land \theta_3} E_3 = E_1 \bowtie_{\theta_1 \land \theta_3} (E_2 \bowtie_{\theta_2} E_3) \] This allows for joins to be performed in different orders, allowing us to do the most selective first (fewer rows) \item Pushdown selection: diff --git a/semester4/dmdb/parts/03_systems/02_indexing/06_art-trees.tex b/semester4/dmdb/parts/03_systems/02_indexing/06_art-trees.tex index 924a6f3..57c91ee 100644 --- a/semester4/dmdb/parts/03_systems/02_indexing/06_art-trees.tex +++ b/semester4/dmdb/parts/03_systems/02_indexing/06_art-trees.tex @@ -1,4 +1,4 @@ -Adaptive Radix Trees (ARTs) are mainly used to ensure primary key constraints and to speed up point and highly selective queries (selectivity <0.1\%). +Adaptive Radix Trees (ARTs) are mainly used to ensure primary key constraints and to speed up point and highly selective queries (selectivity $<0.1\%$). It can also be manually created using \texttt{CREATE INDEX} and are automatically created for columns with a \texttt{UNIQUE} or \texttt{PRIMARY KEY} constraint. The above applies to DuckDB, which is often similar to Postgres. diff --git a/semester4/dmdb/parts/08_quick-overview/03_qp.tex b/semester4/dmdb/parts/08_quick-overview/03_qp.tex index 870eaf5..508a7cf 100644 --- a/semester4/dmdb/parts/08_quick-overview/03_qp.tex +++ b/semester4/dmdb/parts/08_quick-overview/03_qp.tex @@ -1,6 +1,6 @@ \subsection{Query Processing} \subsubsection{Sorting} -Given $B$ frames of memory and $N$ records, we ahve +Given $B$ frames of memory and $N$ records, we have (typically I/Os in pages to be read) \begin{itemize} \item \bi{Merge Sort}: $2N \cdot P$, with $P = (1 + \ceil{\log_{B - 1}\ceil{N \div B}})$ the number of passes. After the first pass, $\ceil{N \div B}$ number of sorted runs were created (typically) diff --git a/semester4/dmdb/parts/08_quick-overview/04_checklist.tex b/semester4/dmdb/parts/08_quick-overview/04_checklist.tex index 0b2d47a..fd94b80 100644 --- a/semester4/dmdb/parts/08_quick-overview/04_checklist.tex +++ b/semester4/dmdb/parts/08_quick-overview/04_checklist.tex @@ -9,6 +9,7 @@ The following things are typically important to know very well (not exhaustive) \item Conflict Serializability \item Core concepts of Vector Search \item Recoverability (both the normal techniques, plus Snapshot Isolation and 2-Phase Locking (and strict variant thereof)) + \item Rewriting rules \end{todolist} Note that since this course is taught (quite) poorly, there may be wrong questions or possibly even questions that are somewhat outside the scope of this course