Home / Expert Answers / Operations Management / part-ii-specify-the-following-views-and-a-trigger-in-sql-on-the-company-database-schema-shown-em-pa989

(Solved): PART II- Specify the following views and a trigger in SQL on the COMPANY database schema shown. EM ...



PART II- Specify the following views and a trigger in SQL on the COMPANY database
schema shown.
EMPLOYEE
Fname Minit Lname Ss

PART II- Specify the following views and a trigger in SQL on the COMPANY database schema shown. EMPLOYEE Fname Minit Lname Ssn Bdate Address Sex Salary Super_ssn Dno 4444 DEPARTMENT Dname Dnumber Mgr_ssn Mgr_start_date DEPT_LOCATIONS Dnumber Dlocation PROJECT Pname Pnumber Plocation Dnum WORKS ON Essn Pho Hours DEPENDENT Essn Dependent_name Sex Bdate Relationship a) (10 points) A view that has the project name, controlling department name, number of employees, and total hours worked per week on the project for each project. b) (10 points) A view that has the project name, controlling department name, number of employees, and total hours worked per week on the project for each project with more than one employee working on it. c) (10 points) Write a trigger that whenever an employee's project assignments are changed, check if the total hours per week spent on the employee's projects are less than 30 or greater than 40; if so, notify the employee's direct supervisor.


We have an Answer from Expert

View Expert Answer

Expert Answer


Question a: SQL view : create view projectDetails as select pname,dname,count(ssn) as NumberofEmployees,sum(hours) as totalHours from project , department,employee,works_on where project.dnum=department.dnumbe
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe