You can apply rules to the relationships between tables. The rules specify how an action on one table affects the other tables in the database. DP4 automatically implements the rules when the table is accessed. This can reduce the amount of development time needed for an application program.

The rules of referential integrity are:
|
Parent Check |
Check a parent record exists before inserting a child. For example, check that a customer exists before an order can be created for the customer |
|
Update |
Maintain an index link to another table. For example, make sure DP4 updates the link between order lines and materials when a change is made |
|
Prevent Change |
Ensure the key fields that identify the parent table cannot be changed. For example, make sure the customer for an existing order cannot be changed |
|
Orphan Check |
Do not allow a parent record to be deleted if there are children. For example, do not allow the deletion of a customer for which orders exist |
|
Child Delete |
Delete all the child records of a deleted parent. For example, when a customer is deleted, delete all their outstanding orders (order header and order line records) |
|
Parent Verify |
Check whether a parent record has been updated since it was last read. For example, make sure the material price is still the same before updating an order line |