100%(3)3 out of 3 people found this document helpful
This preview shows page 3 out of 3 pages.
Therefore, my database is in 3NF.4.If your database is not in 3NF, then modify it so that it is in 3NF. Justify yourclaim that your modified database is in 3NF.5.Does the database of step 4 enforce this functional dependency (and the business rule that it represents) when a new employee (whatever their status) is added to the database? Explain how.6.On the database of step 4 create a view that shows for each employee their name, department, supervisor, and discount level and no other fields. Name this view "emp_discount".Use "emp_discount" to write a query which outputs for each department, and the average discount for all members of the department.drop view if exists emp_discount;create view emp_discount asselect E.employee_name as employee, Dep.dept_name as department, Sup.supervisorSSN as supervisor, Dis.discount_rate as discountfrom employee as E, department as Dep, discount as Dis, supervisor as Supwhere E.SSN = Dep.SSN and E.SSN = Sup.SSN and E.position = Dis.position;select * from emp_discount;--average discountselect emp_d.department, round(AVG(emp_d.discount),3) as avg_discountfrom emp_discount as emp_dgroup by emp_d.department