mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-09-10 13:05:24 +02:00
[DMDB] improve links for SQL section
This commit is contained in:
Binary file not shown.
@@ -1,4 +1,3 @@
|
|||||||
\newpage
|
|
||||||
\subsection{Data Manipulation Language (DML)}
|
\subsection{Data Manipulation Language (DML)}
|
||||||
The DML is used to insert, update and delete data from the database.
|
The DML is used to insert, update and delete data from the database.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
\newpage
|
||||||
\subsection{Query Language}
|
\subsection{Query Language}
|
||||||
|
\label{sec:sql-query-language}
|
||||||
The basic structure of a \sql\ statement is \texttt{SELECT I FROM T WHERE C},
|
The basic structure of a \sql\ statement is \texttt{SELECT I FROM T WHERE C},
|
||||||
which corresponds to $\Pi_{\texttt{I}}(\sigma_{\texttt{C}} \texttt{T})$.
|
which corresponds to $\Pi_{\texttt{I}}(\sigma_{\texttt{C}} \texttt{T})$.
|
||||||
|
|
||||||
@@ -38,5 +40,6 @@ To get just the year from an existing date object (or string), use \texttt{YEAR}
|
|||||||
|
|
||||||
The current date, time, year, etc is provided using \texttt{current\_date} (etc).
|
The current date, time, year, etc is provided using \texttt{current\_date} (etc).
|
||||||
|
|
||||||
There are also conditional statements, namely \texttt{CASE WHEN condition1 THEN result1 WHEN condition2 THEN result2 ELSE else END}, or of course, more conditions.
|
There are also conditional statements, namely
|
||||||
This can even be used inside aggregations, etc!
|
\mint{sql}{CASE WHEN condition1 THEN result1 WHEN condition2 THEN result2 ELSE else END}
|
||||||
|
or of course, more conditions. This can even be used inside aggregations, etc!
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ The following \sql\ logical operators are available (may not be exhaustive for a
|
|||||||
\shade{gray}{Arithmetic Operators} $+, -, *, /, \%$ are defined as usual.
|
\shade{gray}{Arithmetic Operators} $+, -, *, /, \%$ are defined as usual.
|
||||||
|
|
||||||
This also means that we can use \acrshort{sql} as a calculator, for example::
|
This also means that we can use \acrshort{sql} as a calculator, for example::
|
||||||
\mint{sql}|SELECT a * b|
|
\mint{sql}|SELECT a * b;|
|
||||||
|
|
||||||
We can use the arithmetic operators like this:
|
We can use the arithmetic operators like this:
|
||||||
\mint{sql}|SELECT Value * 1.1 FROM Data;|
|
\mint{sql}|SELECT Value * 1.1 FROM Data;|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
\subsection{Checklist}
|
\subsection{Checklist}
|
||||||
The following things are typically important to know very well (not exhaustive)
|
The following things are typically important to know very well (not exhaustive)
|
||||||
\begin{todolist}
|
\begin{todolist}
|
||||||
\item SQL (syntax, some concepts, such as using \texttt{WITH} statements often to make the task more approachable), see Section~\ref{sec:sql-basic-ops}
|
\item SQL (syntax, some concepts, such as using \texttt{WITH} statements often to make the task more approachable), see Section~\ref{sec:sql-query-language}
|
||||||
\item Relational Algebra notation, see Section~\ref{sec:relational-model-logic-algebra}
|
\item Relational Algebra notation, see Section~\ref{sec:relational-model-logic-algebra}
|
||||||
\item Functional Dependencies (including Candidate Keys, Super Keys, Closures and minimal covers), see Section~\ref{sec:functional-dependency}
|
\item Functional Dependencies (including Candidate Keys, Super Keys, Closures and minimal covers), see Section~\ref{sec:functional-dependency}
|
||||||
\item Normal Forms (and their Decomposition / Synthesis Algorithms), see Section~\ref{sec:normal-forms}
|
\item Normal Forms (and their Decomposition / Synthesis Algorithms), see Section~\ref{sec:normal-forms}
|
||||||
|
|||||||
Reference in New Issue
Block a user