COSC-3421, Winter 2001
Project III: The SQL Challenge
Version 1.8


In this project, you will work with an existing database, the StLawrence Bookseller's Database (StL DB). Actually, everyone will install their own private copy of the database on which to work.

Project III, the SQL Challenge, is to implement a number of SQL queries over the StL DB.

Two scripts are provided:

The script stl-create will create the StL DB schema for you. It will also populate the tables with mock data. The script stl-drop is provided for convenience. It will drop your copy of StL DB from your DB2 schema space. If you mess things up, you can always drop StL DB and then re-create it.

To create the StL DB in your DB2 schema space:

Read the schema definition in stl-create for StL DB to understand the design and what the StL DB is about.


The SQL Challenge

There are 15 queries that you are to write. Each is worth one point for a total of 15 points for Project III. I am the manager and I provide you with English specifications for the queries that I want answered from the database. You are providing SQL implementations of these queries for StL DB to do the job.

Each query is given a name, q1-q15, for bookkeeping. You have successfully implemented the SQL query if you get the same result when run in DB2 on StL DB. (And, of course, you have not cheated by making a simple query on purpose that manages to print the same results!) Otherwise, your query is unsuccessful. Grading per query is all-or-nothing. Either your query produces the right results, or it does not. The queries will be verified by a software tool we designed for that purpose. Make absolutly sure that the order of your attributes in the output is the same as specified for each query. Otherwise, our marking tool will say that your query is incorrect!

Honesty: For projects, you are permitted to confer with others, seek advice, and (to a reasonable extent) help. However, remember that copying someone else's queries and claiming them as your own work is plagiarism. You must do your own work.


Deliverables

For each query, write your query in a file with the corresponding name as above. Have all of your query files together in a directory named query.

Include a file called INFO in your directory query. Put your name and student# in this file. Do not forget this!

When you are finished, use the submit command on ARIEL to turn in your directory query with your work.

% submit 3421M StL query