Question: 10. Once the view has been created, create an INSTEAD OF trigger on the CUSTOMER_VIEW to allow updates to the customer's name, while maintaining the

10. Once the view has been created, create an INSTEAD OF trigger on the CUSTOMER_VIEW to allow updates to the customer's name, while maintaining the history of previous names; by following these criteria: 10.1.1. The trigger should be invoked for INSERTs or UPDATEs. 10.1.2. The trigger should update the CUSTOMER_NAME table entry that matches the IDCUSTOMER and has the ENDDATE as NULL, to have the current SYSDATE as the ENDDATE. 10.1.3. The trigger should use the CNAME_SEQ sequence and insert a new record into the CNAME table. 10.1.4. The trigger should use the CN_5EQ sequence to insert a new record into the CUSTOMER_NAME table. The new record should link the new CNAME record to the existing CUSTOMER record; using the current SYSDATE as the STARTDATE, and also setting ENDATE to the value NULL to indicate that the new name is the currently valid name
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
