CST1600 Relational Databases
Instructional Guide


Current WebEx lecture recordings Fall 2015


phpMyAdmin login <-- Crashed server (rebuilt hard drive) Operational again
tools.ridgewater.org <-- New server (login info is same as old server) Slower...
Username is ridgeorg_ and first five letters of last name and first two of first name.  ridgeorg_smithjo
Password is student ID.


Class SQL files.

Sample with 1000 records compliments of Ryan Olsen.

Create sample data www.generatedata.com.

Government data sets www.data.gov.


CST1600 Database 1

MySQLTutorial.
cst1600db1.sql.zip
cst1600db1Schema.pdf

Homework Set 1 Results

Each problem is 10 points.
Submit a screenshot of your entire desktop showing the entire query and the full results for each problem. These are individual homework sets and are to be of your own work.
Due Dec 1 at 5pm to get full credit. 1/2 credit after Dec 1 at 5pm until Dec 8 at 5pm at which time the dropbox closes.

#1 List all countries that customers are from. Eliminate all duplicates so that a particular country is listed only once.

#2 List the customer names of the top 10 customers that have ordered the most in dollar volume.

#3 List orders where their total amount were greater than $60,000. List the order number, customer number, status, and shipped date.

#4 List all products that have the word “Cars” in the product line. List the product code, product name, and product line.

#5 List the customer names that have purchased model trains. Customers should be listed only once.


Homework Set 2

This is a problem that consists of several parts, but is submitted to a single dropbox.

Create a new procedure with a name of your choosing. You are to create a procedure that adds new employees to the employees table.

Use some of the code we developed earlier for creating a unique email address as a starting point.

Input parameters need to include last name, first name, office code, reports to, and job title.  The phone extension may be left blank.

When running the procedure, your code must assign an employee number that is 1 greater than the highest employee number currently.  10pts.

When running the procedure, your code must create a unique email address consisting of first initial and last name like we did in class. 10pts.

For testing, run your procedure which will insert this data: 5pts.

yourlastname, yourfirstname, 3, 1143, Sales Rep  <-- Use your name.
Johnson, Julie, 4, 1102, Sales Rep
Johnson, Jeffrey, 4, 1102, Sales Rep
Johnson, Jack, 3, 1143, Sales Rep

Screenshot showing the bottom of the employee table demonstrating that the new employees have been added. Submit to the D2L dropbox. 5pts.

Export your code to a text file. It should be nicely formatted for easy readability. Submit the text file to the same D2L dropbox. 10pts.

The dropbox will contain 2 submissions from you. The screenshot and the text file.
These are individual homework sets and are to be of your own work.
Due Dec 13 at 5pm to get full credit. 1/2 credit after Dec 13 at 5pm until Dec 16 at 5pm at which time the dropbox closes.