Question: (1) Implement and comprehensively test a statement trigger that verifies the following consistency constraint. An applicant cannot apply more than three positions in one day.
(1) Implement and comprehensively test a statement trigger that verifies the following consistency constraint. An applicant cannot apply more than three positions in one day. (2) Implement and comprehensively test a row trigger that verifies the following consistency constraint. The value of position number must be continuous. "Contiguous" in a relationship to the position number means, that the first position must have a number 1, the second position must have a number 2, and each next position must have a number greater by one than a number of the previous position. Hint: To avoid "mutating table" error, insert a line PRAGMA AUTONOMOUS_TRANSACTION At the beginning of DECLARE block. When ready save your CREATE TRIGGER statement and all SQL statements that comprehensively test a trigger in a script solution1.sql. Comprehensive testing means that the trigger must reject SQL statements that violate the consistency constraint and accept SQL statements that do not violate the consistency constraint. It is a part of your task to find what SQL statements should be tested. Whenever SQL statement violates the consistency constraint a trigger must return ORA- error message. Use a procedure RAISE_APPLICATION_ERROR to return ORA- error message. If SQL statement does not violate the consistency constraint then a trigger must return no messages.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
