Data integrity: the process of maintaining the consistency of the database.
Being able to guarantee data integrity is vital to the database.
Tutor Definition: Data integrity is the process of ensuring all fields contain information that is up to date, correct at the time of filling in and consistent.
Referential Integrity
Referential Integrity: a technique for ensuring data integrity in a referential database.
Refers to the accuracy and consistency of data within a relationship.
Tutor Definition: Referential integrity is the ensuring that fields that are the same between tables that contain the same data. This can be done by having a relationship between tables. For example, this can be broken in a flat file database if the address of a person is updated in one table and not the other.
Referential integrity is a sub-set of data integrity.
Enforce Cascade Delete Restraint
Associated data/relationships are deleted alongside the primary key, if/when deleted.
This must be used with caution as it may delete crucial/important/unrelated data.