Tech moves fast! Stay ahead of the curve with Techopedia!
Join nearly 200,000 subscribers who receive actionable tech insights from Techopedia.
Data integrity is the overall completeness, accuracy and consistency of data. This can be indicated by the absence of alteration between two instances or between two updates of a data record, meaning data is intact and unchanged.
Data 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.
Data Integrity could be enforced both at the physical and logical level. The first includes protecting data against various external factors such as power outages, unexpected calamities, data breaches, damage caused by human operators, and so forth. The latter is concerned with maintaining the rationality of data within relational databases.
Logical integrity is compromised when an error occurs, such as when a human operator makes a mistake while manually entering data into the database. Other common reasons why data integrity may be compromised include bugs and/or malware, and transferring data from one site within a database to another where some fields are absent.
Data integrity is enforced in both hierarchical and relational database models. 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.
This definition was written in the context of Databases.
Do you work in the tech industry? Help us learn more about why the gender gap still exists in tech by taking this quick survey! Survey respondents will also be entered to win a $100 Amazon Gift Card!