Homework 3 (due 10/9)

We have talked more about SQL (see new presentations and chapter 7), and will continue to do so next week. If you need a refresher in logic, check Boolean Logic.

If you want to test out the SQL queries using set operations you need a database other than Access (which only supports union, but not intersection or set difference). For that, try the H2 Database Engine (free download). You will need SQL code to create the company database. After you have started H2, copy/paste the SQL code into the database window and run it. For some info on how to use H2, see notes on H2.

1. [Pine Valley SQL]

   Write SQL for the following queries, and list the output:

2. [Company SQL]

   Write SQL for the following query, and list the output:

Marcus Schaefer
Last updated: October 2nd, 2007.