Data integrity is assuring the accuracy and consistency of data over the lifetime of an asset. Any system that stores, processes, or retrieves data must consider this aspect when designing, implementing, and utilizing it. In some circumstances, data integrity is used as a proxy term for data quality. However, data validity is a prerequisite for data integrity.
Regardless of the data integrity technique used, its purpose is the same: make sure data is recorded as intended (such as a database rejecting mutually exclusive possibilities correctly). Furthermore, ensure the data is identical when retrieved later.