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.
Such complex processing may include the testing of conditional constraints for an entire complex data object or set of process operations within a system.
Checks to ascertain that only expected characters are present in a field.
For example, many database systems allow the specification of the following l (plus, minus, and parentheses).
A more sophisticated data validation routine would check to see the user had entered a valid country code, i.e., that the number of digits entered matched the convention for the country or area specified.
Simple range and constraint validation may examine user input for consistency with a minimum/maximum range, or consistency with a test for evaluating a sequence of characters, such as one or more tests against regular expressions.
Validation of the foreign key field checks that referencing table must always refer to a valid row in the referenced table.Enforcement action typically rejects the data entry request and requires the input actor to make a change that brings the data into compliance.
This is most suitable for interactive use, where a real person is sitting on the computer and making entry.
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.