oracle-databaseoracle-sqldeveloperoracle-sql-data-modeler

Defining a trigger in Oracle Data Modeler: what "State", "Ref OLD as", "Ref NEW as", "Ref PARENT as", "Cross Edition" and "Condition" mean?


I am defining a trigger for Oracle 11g XE using Oracle DataModeler.

enter image description here What the following boxes mean?: "State", "Ref OLD as", "Ref NEW as", "Ref PARENT as", "Cross Edition" and "Condition"

Thanks,


Solution

  • Triggers (in some cases) can reference the row they are modifying before and after the dml, in the trigger's code you can reference the row in the before state with the variable old and in the after state with the variable new. Oracle Data Modeler is asking you if you want to use different names for these two variables.

    Similarly the variable parent is for when you define a trigger for a nested table, you can reference the parent row as parent. You can use another name if you specify it in data modeler.

    Condition is the condition that has to be verified for the trigger to run (in oracle you can specify a condition ).

    Cross Edition has to do with edition based redefinition: they are explained here: http://www.oracle.com/technetwork/issue-archive/2010/10-mar/o20asktom-098897.html.

    State shows you if the trigger is enabled or not.

    You can view the same information querying the view all_Triggers.