REP007 - Table Validation Rules/Triggers

Application business rules are centrally defined in the LANSA repository as validation rules either in the field or the table definition. Centralized field validations remove the need for developers to code the same validation into each program that uses the table.  A rule is checked when a database table operation (such as an insert, update or delete) is performed.

Objectives:

iiiDeptCode

Must be in range A to ZZZ

 

iiiDeptCode

iiiDeptCode must exist in table iiiDepartments

iiiSalary

Must be less than 10000.00

 

To achieve these objectives, you will complete the following:

Step 1. Add a Rule to Table iiiDepartments

Step 2. Recompile the Table and Test Department Rules

Step 3. Referential Integrity Rule in iiiEmployees Table

Step 4. Add Rules to iiiSalary Field

Step 5. Recompile the Table and Test Employee Rules

Step 6. Complete Referential Integrity

Step 7. Review Table Level Triggers

Summary

Before you Begin

In order to complete this exercise, you must have completed the previous exercises.