CSC 335 - Database System Concepts
Homework # 2
Due Date: February 17, 2011


Solve the following questions using Oracle. Upload separate files containing the solutions for questions 1, 2, 3, and 4 on eccentric. Name your files q1.sql, q2.sql, q3.sql, and q4.sql. All comments and non executable Oracle statements in these files must start with the keyword REM (you may also use Java/C++ comment styles). I will run the files you upload on eccentric in Oracle using the start command. If I am unable to run your files, you will receive a zero grade. You also need to hand in a hard copy of the solutions to all questions in class on the due date. Please write your name and the name of your eccentric folder on the hard copy.  

  1. [20 points] Exercise 3.20 page 110. Include foreign key constraints where needed. Notice that both employee_name and manager_name are foreign keys in the table manages referencing the table employee. Be careful about the order you create the tables.

  2. [20 points] Populate the tables you created for the previous question with data. Be careful about the order you populate the tables.

  3. [40 points] Exercise 3.16(b,c,d,e) page 109.

  4. [20 points] Exercise 3.17(b,c) page 110.