Data integrity is defined as data that has a complete or whole structure; meaning that all the characteristics of the data, including the definitions, rules, relationships and metadata, must be correct in order for it to be complete.
In the application of data integrity, all functions, such as adding, removing, changing, transforming - performed against data must maintain its integrity.
The architecture and design of a database is therefore crucial to the integrity of data. Enforcing database integrity ensures the validity, accuracy and consistency of the data. This is done through the use of data validation and integrity constraints rules which must be adhered to before data can change in the database. It is crucial that the integrity of the database is defined correctly during the database design process, this can prevent a lot of frustration and cost in the future.