Do the following exercises on the Oracle HR database, see lab 1 for information on the HR database and on how to access it in OracleXE.

  1. Write SQL queries that:

    1. Get a list of the employees who have finished all of their jobs. N.b., this is trickier that you might think; check the multiplicities and constraints set in the DB schema.
    2. Get a list of employees along with their manager such that the managers have less seniority at the company and that all the employees’ jobs have been within the manager’s department.
    3. The countries in which at least one department is located. Try to write this as both a join and a nested query. If you can, explain which is better. If you can’t, explain which is not possible and why.

    Store your results in homework05_1.sql.

  2. Complete the programming elements for the lab exercises.

Make your queries as simple and efficient as possible.

Checking in

We will grade your work according to the following criteria: