IBM i Database Trigger Support
In the i OS operating system, a trigger is a set of actions that execute automatically when a program performs a specified change operation on a specified database file. The change operation can be an insert, update, delete or read high level language (HLL) statement in an application program. You can design triggers to do almost anything—some uses for triggers include:
- Enforcing business rules
- Validating input data
- Writing to other files for audit trail purposes
Some benefits of using triggers are:
- Faster application development: Because triggers are stored in the database, actions performed by triggers do not have to be coded in each database application
- Global enforcement of business rules: A trigger can be defined once and then reused for any application using the database
- Easier maintenance: If a business policy changes, it is necessary to change only the corresponding trigger program instead of each application program
- Improve performance in client/server environment: All rules are run in the server before returning the result
This section contains the following topics:
Implementing Triggers
CA 2E Model Support
Model to Run-Time Conversion
Run-Time Support