CS 418/518 - Web Programming
Spring 2014: Tues/Thurs 9:30-10:45am, E&CS 2120 |
Staff
|
Lab 1 - MySQLJanuary 23, 2014 Intro
SetupCreate a new directory Lab Exercises(Exercises come from http://cs.smith.edu/dftwiki/index.php/CSC220_Exercises_with_MySQL and http://web.archive.org/web/20120808033719/http://code.google.com/edu/tools101/mysql.html) 1) Table NormalizationWe have a database with two tables. The second table (orders) shows customer orders for different items with the quantity and price for each item. Go through the data normalization process to improve this database. Write out your new database structure on paper and discuss it with another student (if working alone) or group (if working in a group). 2) Store InventoryIn your MySQL database on weiglevm, create a table named id name qty price 1 apple 10 1 2 pear 5 2 3 banana 10 1.5 4 lemon 100 0.1 5 orange 50 0.2 Using SELECT statements, complete the following tasks:
First check your SELECT statements using the MySQL command line or the phpmyadmin interface. Then, write a web page named 3) CoursesCreate the following tables:
id name dept_id 1 111 1 2 112 1 3 250 1 4 231 1 5 111 2 6 250 3 7 111 4
id name 1 CSC 2 MTH 3 EGR 4 CHM
course_id count 1 40 2 15 3 10 4 12 5 60 6 14 7 200 Using SELECT statements, answer the following questions/tasks:
First check your SELECT statements using the MySQL command line or the phpmyadmin interface. Then, write a web page named |