TRIGGERS BEHAVIOUR
Posted in 1996
Topics: Triggers, Constraints & Referential Integrity
We are interested by the semantics of informix triggers. Some features if the triggers are not clear for us : In particular, we have no response to the folllowing questions. QUESTION 1: When FOR EACH ROW informix triggers are executed ? i)After the SQL Statement ? ii) Immediately after insert, delete, or update operations to individual tuples only? QUESTION 2 : Is the action part of a informix trigger interruptable? That is, if a trigger TR0 executes two SQL statements S1 then S2 in its action part and if S1 triggers another trigger TR1, what is the resulting execution : SCENARIO 1 : The action of TR0 is interrupted; TR1 is executed; then, S2 executes after TR1 terminates. SCENARIO 2 : The execution of TR1 is delayed until TR0 is terminated. QUESTION 3 : If the execution follows SCENARIO 2 : What happens in this new SCENARIO 3 : Given a new Trigger TR2 defined on a different triggering events from TR1, assume that S2 also triggers TR2 and TR3. i) Once TR0 is terminated, what trigger is first executed TR1? TR2? TR3? ii) Suppose that TR1 is chosen and that in turn TR1 triggers TR2. ---> What trigger is then executed? TR2? TR3? --->Is TR2 executed once or Twice ? (one time for the triggering event within TR0 and one another time for the triggering event within TR1's action? (in particular, is it possible to have the following execution order : TR2 then TR3 then TR2. Thank you for your help ! Francoise & Francois