CS 338 – Computer Applications in Business:  Databases
Winter 2006 Assignment 1

Due:  Monday, 2006-1-16

Submission:  Electronic submission by 1800h (6:00 PM)

Background

This is a short “warm-up” assignment intended to familiarize you with the IBM DB2 system.  In order to complete this assignment you will need the following skills:

·         signing on to Unix, using standard commands and editing a text-file

·         running DB2 and issuing commands

·         using the Unix “submit” facility

There are tutorials available for these topics from the course Web page at http://www.student.cs.uwaterloo.ca/~cs338/current-term.  You should pay particular attention to http://www.student.cs.uwaterloo.ca/~cs338/current-term/db2hints.htm.

Question 1

On page 1-32 of the notes is the sample relational database that we have been using in class.  On pages 1-36 and 1-37 is the SQL DDL for the database.  Implement (define and populate) this database using DB2.

Suggested steps:

1.        Read the Web tutorial material, especially
http://www.student.cs.uwaterloo.ca/~cs338/current-term/db2hints.htm.

2.        Use one of the shell scripts in ~db2cs338/sqllib/ to set up the DB2 environment for your account.

3.        Create script files (text files containing SQL statements) for the DDL to create the tables.  Don’t forget to include “connect to cs338” at the beginning of your script.  The name of this file should be ddl.sql

4.        Log into Unix and confirm that you can start DB2.  You might like to try a few interactive commands.

5.        Create the tables using your script.  Use “db2 -v -f ddl.sql” as described in the CS338 Hints.

6.        Populate the tables by creating file (called populate.sql) with the appropriate INSERT statements and then running that file through DB2.

7.        Create a third script (called showtables.sql) that verifies the table definitions with the DB2 DESCRIBE command, and the contents with SELECT * FROM … statements (one for each table).

If necessary (e.g. running your scripts more than once), you can remove a table with the DROP TABLE statement. 

What to submit:

The electronic submission for this question will copy the three .sql files (ddl, populate and showtables). 

Question 2

Imagine that you have been given the task of selecting a DBMS for a medium-size business that has offices in only one location.  The DBMS is intended to support “mission-critical” applications, such as the organization’s websites and other strategic information systems.

You have been given a short-list of three possible products:

·         Microsoft Access:  http://www.microsoft.com/office/access/prodinfo/overview.mspx

·         MySQL Pro Certified Edition:  http://www.mysql.com/products/database/mysql/

·         IAnywhere SQL Anywhere Studio:  http://www.ianywhere.com/products/sql_anywhere.html

Review the product information for the three products, starting with the web reference shown.  You are free to look at other information as long as you include an appropriate reference.

Using the “Requirements for a DBMS” material in Section 1 of the Lecture Notes as a starting-point for your review, analyze the suitability of each of the three products for your hypothetical company.  You should not consider cost of the products as part of the analysis – only consider the technical aspects.  Rank the three products in order of suitability, and justify your discussion.  Be sure to describe any major assumptions you make.

Please limit your response to two pages (approximately 500 words).

What to submit:

Put your answer into a plain-text file called a1q2.txt and use submit.  Please do not submit MS Word files.