In modern Relational database values in two tables can be linked through foreign key and primary key.
If values in the primary key field are not constrained by database internal mechanism, then they should be validated.
A validation process involves two distinct steps: (a) Validation Check and (b) Post-Check action.
For example if contact record in Payroll database is marked as "former employee", then this record must not have any associated salary payments after the date on which employee left organization (Cardinality = 0). An extra digit is added to a number which is calculated from the digits.The computer checks this calculation when data are entered.The batch total is entered and the computer checks that the total is correct, e.g., add the 'Total Cost' field of a number of transactions together. If order does not exist for a "customer" record then it must be either changed to "seed" or the order must be created.This type of rule can be complicated by additional conditions.The Post-validation action sends feedback to help enforce validation.', '