\begin{frame} \frametitle{Non-Monotonic Behaviour} \begin{goal}{} SQL queries using only the constructs introduced so far compute \emph{monotonic functions} on the database state: \begin{itemize} \item if further rows gets \emph{inserted},\\ these queries yield a \emph{superset} of rows. \end{itemize} \end{goal} \pause\medskip However, not all queries behave monotonically in this way. \begin{exampleblock}{Example of a non-monotonic query} \medskip Query: find students who have not submitted any homework. \begin{itemize} \pause \item Currently, \sql{Bart Simpson} would be a correct answer. \pause \item This answer is no longer valid after:\\ \begin{code}{.8\textwidth}{} \small \sql{insert into Results values (104, \textquotesingle{}homework\textquotesingle{}, 1, 8)} \end{code} \end{itemize} \end{exampleblock} \pause\medskip Such \emph{non-monotonic} queries \emph{cannot} be formulated with the SQL constructs that we have seen so far. \end{frame}