CST1600 Relational Databases
Instructional Guide
Current WebEx lecture recordings Fall 2015 phpMyAdmin login <-- Crashed server (rebuilt hard drive) Operational again 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. Homework Set 1 Results Each problem is 10 points. #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. 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. |