Lab #2: Database creation and the very basics of SQL queries
Purpose: In this lab, you should establish solid understanding and skills to use
· CREATE DATABASE, CREATE TABLE statements to create a database and tables,
· INSERT INTO statements to insert records into the tables,
· SHOW TABLES and DESCRIBE to gain information about databases and tables,
· SELECT statements to write simple queries involving only a single table using
Step 1: Login into MySQL local server in Metzger 100 lab with the password mysql.
Step 2: Follow the examples in this sample script to interact with MySQL database server to establish solid understanding and skills as described in the purpose section above.
Step 3: Create the customer table and the order table in the same database, and insert the records into the tables.
Step 4: Write SELECT statements to find
Step 5: Report your progress in this lab in this week’s progress report.
Useful references for doing this homework:
· The overview handout on SQL