Lab #3: SQL queries involving multiple
tables
Purpose: In this lab, you should establish solid understanding and skills to
· relate three of the basic relational algebra operations: cross product, selection operation, and projection operation to the FROM clause, the WHERE clause, and SELECT clause of the SQL language, and
· write SQL queries involving two or more tables precisely based on the understanding of the three basic relational algebra operations above.
Step 1: Login into MySQL local server in Metzger 100 lab with the password mysql.
Step 2: Use the buildUpDB.txt script to build up the records of the database containing the salespeople, customers, and orders tables as described in Homework#2. Follow the example queries in lab3.txt to interact with MySQL database server to establish solid understanding and skills as described in the purpose section above.
Step 3 Write SQL SELECT statements to find
Step 4: Write down the SQL
queries you have for the questions above in this week’s progress report.
Useful
references for doing this homework:
· Simple tutorial on the very basics of SQL from W3 SCHOOL
· The SQL overview handout and the relational algebra handout