\begin{frame}
\frametitle{Multiple Tables}
\begin{exampleblock}{}
\begin{minipage}{.5\textwidth}
\tablepersons
\end{minipage}
\begin{minipage}{.49\textwidth}
\tablechats
\end{minipage}
\end{exampleblock}
\begin{goal}{}
\emph{Query:}
PIDs of all people that have chatted with everyone in the persons table (except themselves).
\end{goal}
\pause
\alt<-7>{
\begin{exampleblock}{Relational Model}
\vspace{-1ex}
\begin{talign}
\mpause[1] {
&\{\; y \;\mid\;
\mpause{\myex{y_2,y_3}{\text{\textit{Person}}(y,y_2,y_3)}} \\
\mpause{
&\hspace{.9cm} \wedge\; \myall{x}{ \big( \mpause{\;x \ne y \;\wedge\; \myex{x_2,x_3}{\text{\textit{Person}}(x,x_2,x_3)} } \\
&\hspace{1.8cm} \;\to\; \mpause{ \myex{c_1,c_2}{(\, \text{Chat}(c_1,y,x,c_2) \vee \text{Chat}(c_1,x,y,c_2)\,) }} \big)}
} \; \}
}
\end{talign}
\end{exampleblock}
}{
\begin{exampleblock}{Tuple Model}
\pause[8]
\vspace{-1ex}
\begin{talign}
\mpause[1] {
&\{\; \text{PID}(y) \;\mid\; \text{\textit{Person}}(y) \;\wedge\; \myall{x}{ \big(\; \text{\textit{Person}}(x) }
\wedge x \ne y \\
&\hspace{1.5cm} \;\to\; \mpause{ \myex{c}{\big(\, \text{\textit{Chat}}(c) \wedge {}\\
\mpause{
&\hspace{3cm} (\;\;\;\; (\text{P1}(c) = \text{PID}(x) \wedge \text{P2}(c) = \text{PID}(y)) \\
&\hspace{3cm} \;\vee (\text{P1}(c) = \text{PID}(y) \wedge \text{P2}(c) = \text{PID}(x)) \;\;) } \,\big) }} \big) \; \}
}
\end{talign}
\end{exampleblock}
}
\vspace{10cm}
\onslide<10>{}
\end{frame}