I could imagine how those queries would have been represented in CODASYL by programs that were five pages long that would navigate through this labyrinth of pointers and stuff. Codd would sort of write them down as one-liners. … They weren't complicated at all. I said, "Wow." This was kind of a conversion experience for me. – Don Chamberlin, quoted in IBM Research News (EF Codd’s obituary), April 2003

Work through the following materials writing one sample query for each mechanism using the modified version of the movies database (see code/05sql/guide05.sql

  1. Basic SQL (Section 6.3) — Review basic SQL as needed, then write sample queries that:

    1. Use one or more tuple variables (Section 6.3.2).

    2. Use one or more of the set operations, e.g., UNION, EXCEPT, INTERSECT (Section 6.3.4).

  2. Advanced SQL (Sections 7.1.1–7.1.5) — This will include more new material; write sample queries that:

    1. Select based on a NULL field value (Section 7.1.1).

    2. Implement a nested sub-query, using [NOT] EXISTS, IN, ANY or ALL (Sections 7.1.2–7.1.4).

    3. Implement a correlated sub-query (Section 7.1.3).