\begin{frame}
\frametitle{Queries in Databases: Tuple Model}
\begin{goal}{Tuple Model}
In this model, the \emph{rows are objects} themselves (tuples).
\medskip
\pause
A unary predicate \textit{Person} tells if a row belongs to table Persons:
\begin{talign}
\textit{Person}(x)
\end{talign}
\pause
Functions symbols for every column of the table:
\begin{talign}
\text{Pid}(x) && \text{Name}(x) && \text{City}(x)
\end{talign}
\pause
(project the tuple/row to one of its arguments $\langle\; y_1,\ldots,y_n\;\rangle \mapsto y_i$)
\end{goal}
\pause\medskip
We can formulate \emph{queries using the function symbols}.
\begin{exampleblock}{}
The names of people living in Amsterdam:
\pause
\begin{talign}
\{\; y \;\mid\;
&\myex{x}{\big( \text{\textit{Person}}(x) \wedge \text{Name}(x) = y \wedge \text{City}(x) = \text{Amsterdam}} \big) \; \}
\end{talign}
\pause
or equivalently
\begin{talign}
\{\; \text{Name}(x) \;\mid\;
&\text{\textit{Person}}(x) \wedge \text{City}(x) = \text{Amsterdam} \; \}
\end{talign}
\end{exampleblock}
\end{frame}