The relational model defines many constraints in order to control data integrity, redundancy, and validity. Here are some examples of checking for data:
- Redundancy: Duplicate tuples are not allowed in the relation.
- Validity: Check constraints and domain constraints are used to validate the data input, for example, the date of birth should be a date that occurred in the past.
- Integrity: The relations within a single database are linked to each other. An action on a relation such as updating or deleting a tuple might leave the other relations in an invalid state.
We could classify the constraints in a relational database roughly into two categories:
- Inherited constraints from the relational model: Domain integrity, entity integrity, ...