Question: solve these short sql questions Question 2 Figure Q2 shows a simplified Pet Shop employee database application, employee table and department table. Employee table has

solve these short sql questions
solve these short sql questions Question 2 Figure Q2 shows a simplified

Question 2 Figure Q2 shows a simplified Pet Shop employee database application, employee table and department table. Employee table has supervisorID, a recursive foreign key to Employee table. We assume that NULL is allowed for deptNo, indicating that an employee may be temporarily unassigned to any department. Each department has a manager which is a foreign key Employee table. TotalSalary attribute is a derived attribute where the value is the sum of the salaries of all employees in the department. DEPARTMENT EMPLOYEE emplo empName Salary depto supervisor Figure Q2: Simplified Pet Shop employee database a) Examine any THREE (3) possible events (event 1, event 2 and event 3) that may cause a change in the totalSalary Write your answers in just ONE (1) sentence for each event. (3 marks) b) From your answers in Q2a), determine the conditions to be checked for event 1, event 2 and event 3. Write your answers in just ONE (1) sentence for each event. (4 marks) Use TRIGGER clause to solve the actions for event 1, 2 and 3 above to automatically update the totalSalary for the department to reflect the new employee's salary. (18 marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!