Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students also viewed these Databases questions

Question

5. Tell how job experiences can be used for skill development.

Answered: 1 week ago

Question

4. Explain the characteristics of successful mentoring programs.

Answered: 1 week ago