SQL assignment question 2

  • Create your own schema as a copy of HR schema. [create tables with only copying the structure of tables ] [14 Marks]
  • Insert 10-15 records for each table.[10 Marks]
  • Write a PL/SQL code to retrieve the employee details whose employee number is input by the user.[2 Marks]
  • Write a PL/SQL code to display employee details along with region and country name of 5 highest paid employees.[3 Marks]
  • Write a PL/SQL function that accepts department number and returns the total salary of the department. Also write a function to call the function. [3 Marks]
  • Write a trigger on the employee table which shows the old values and new values of first name after any updations on first name on Employee table.[3 Marks]
  • Generate star schema Employees. The grain of the schema should be the combination of hire year, location, region and country. [10 Marks]
  • Create a process to Load the data to the star schema from the central Employee repository. [10 Marks]


You must submit work distribution report [individual involvement] within a team for the project.