[Solved]1 Write Triggers Implement Referential Integrity Fk Dno Employee Named Constraint Empdeptf Q37184168
1. Write Triggers that implement Referential Integrity for FKDno of Employee that is named as Constraint EMPDEPTFK in TableEmployee as specified in Figure 4.2 in the textbook in thefollowing DDL statements below for Company database that youcreated for Lab2. (You may keep the all the new tuples inserted inLab3 and Lab4) 1) Before creating any trigger for this lab, AlterTable to Drop all the PK, FK, Unique Constraints, Cascade, Checkoptions from the Tables Employee and Department for this lab toavoid any possible conflict with a system trigger or any tablemutating problem. 2) Write(Create) triggers to implement ConstraintEMPDEPTFK in Table Employee based on the following rules as definedin DDL for Employee as in Figure 4.2: FK Dno of Employee On DeleteSET DEFAULT (= 1 ) andFK Dno of Employee On Update CASCADE ofDnumber PK of Department 3) Write (Create) Stored ProcedureSP_Audit_Dept that inserts all the history of the data of changesby the trigger you created in 1) above into a tableAudit_Dept_Table. See for the more specific instructions that aregiven in 2 below. 4) Call the Stored procedure SP_Audit_Dept at theend of your Trigger to record all the history of the changes by thetrigger.
Expert Answer
Answer to 1. Write Triggers that implement Referential Integrity for FK Dno of Employee that is named as Constraint EMPDEPTFK in T… . . .
OR

