Basic SQL Queries

Due: 11:00pm, Wednesday, September 13, 2023

Get the Assignment Code

Login to your university Unix account and copy the assignment code to a location under your home directory:

  cp -r /export/home/public/schwesin/csc256/assignments/project1 LOCATION

where LOCATION is a directory of your choosing.

Description

The project1 directory contains a file named project1.sql that contains comments describing the queries that you must write. To run the SQL script with the appropriate database, execute the command:

  sqlite3 path/to/sakila/database < project1.sql

This will produce output to the terminal. Another option is to direct the output to a file (this is probably easier for debugging purposes.) The following command will direct the output to a file named project1.out:

  sqlite3 path/to/sakila/database < project1.sql > project1.out

The sakila.db file is at the path:

  /export/home/public/schwesin/csc256/databases/sakila.db

You should copy this file into a location under your home directory and use the path where you copied it to in the above commands. We will use this database for several upcoming projects.

Turning in the Assignment

To turn in the assignment, execute the submit script by running the command

  make submit

from within the project1 directory.

Grading Criteria

Note if the code has syntax errors or does not execute properly, you will receive a failing grade for this assignment.