What Does Data Integrity Mean?
Data integrity is the overall completeness, accuracy and consistency of data over its entire lifecycle.
When data has integrity, mechanisms have been put in place to ensure that data-in-use, data-in-transit and data-at-rest cannot be changed by an unauthorized person or program. An important goal of maintaining data integrity is to make sure that when data is recovered after a disruption, it can be trusted.
Data Integrity plays an important role in business continuity and disaster recovery and can be enforced both at the physical and logical level. Physical integrity initiatives seek to protect data from harmful external factors such as power outages or hardware failures. Logical integrity initiatives seek to ensure that data remains accessible and error-free.
Common reasons why data integrity may be compromised include formatting errors, syntax errors, malware, ransomware attacks and other malicious actions.
Techopedia Explains Data Integrity
Data integrity is enforced in both hierarchical and relational database models. Integrity is usually imposed during the database design phase through the use of standard procedures and rules. It is maintained through the use of various error-checking methods and validation procedures.
The following three integrity constraints are used in a relational database structure to achieve data integrity:
This is concerned with the concept of primary keys and makes sure that no data is redundant and no fields are null (such as when a numeric cell contains textual information). The rule states that every table must have its own primary key and that each has to be unique and not null.
This refers to all procedures and rules enforced to ensure that data is stored and used consistently. This is the concept of foreign keys.
The rule of foreign keys states that the foreign key value can be in two states. The first state is that the foreign key value would refer to a primary key value of another table, or it can be null. Being null could simply mean that there are no relationships, or that the relationship is unknown.
Domain integrity is a series of rules and procedures that ensure all data items pertain to the correct domains. For example, if a user types a birth date in a street address field, the system will show an error message that will prevent the user from filling that field with wrong information.
The concept of data integrity ensures that all data in a database can be traced and connected to other data. This ensures that everything is recoverable and searchable. Having a single, well-defined and well-controlled data integrity system increases stability, performance, reusability and maintainability.
If one of these features cannot be implemented in the database, it must be implemented through the software. A set of best practices such as planning regular backups, limiting the permissions required to access sensitive data sets, or keeping track of changes through with logs usually helps to protect the integrity of data.