Data Integrity in cyber security is about the reliability and accuracy of data. It is proposed to prevent data that does not conform to the semantics in the database and prevent invalid operations or wrong information caused by the input and output of false information.
Data integrity is one of the three essential points of information security, which refers to ensuring that information or data is not tampered with unauthorized or can be quickly discovered after tampering while transmitting and storing data information.
Confidentiality, Integrity and Availability, known as the CIA triad, is a model developed to guide information security policy within an organization.
Confidentiality is ensuring data, or information remains confidential and protected from those who are not supposed to see it.
Availability is essentially ensuring that systems remain online and accessible to those who need them.
Integrity is about maintaining data consistency and reliability, which is ensuring data doesn't get changed when it is not supposed to be. However, if it does get changed, some alert or something will be raised. Therefore, an analyst can investigate the change.
Data Integrity is divided into four categories and these are:
Entity Integrity
Entity integrity is one of the relational model's three rules of database integrity. Entity integrity rules require all data tables to have primary keys and all fields as primary keys to have unique and non-null values.
Domain Integrity
Domain integrity refers to the validity of the input of a column and whether null values are allowed. Domain integrity is enforced by: restricting the type (by setting the data type of the column), the format (by Check constraints and rules), or the range of possible values (by Foreign Key constraints, Check constraints, Default definitions, Not Null definitions and rules). For example, the student's test score must be between 0 and 100, and the gender can only be "male" or "female".
Referential integrity
Referential integrity is based on the relationship between foreign keys and primary keys and it refers to ensuring the referential relationship between the primary key (referenced table) and the external key (referenced table). It involves the consistent maintenance of data in two or more tables. A foreign key value associates a record in the referenced table that contains the foreign key with a record in the referenced table whose primary key matches the foreign key.
Referential integrity also maintains defined relationships between tables as records are entered, changed, or deleted, ensuring that key values are consistent across all tables. Such consistency requirements ensure that non-existing values are not referenced and that if a key value changes, all references to that key value are subject to consistent changes throughout the database.
User-defined integrity
User-defined integrity is a constraint condition for a specific relational database that reflects the semantic requirements that the data involved in a particular application must meet. It mainly includes non-null constraints, unique constraints, check constraints, primary key constraints, and foreign key constraints.
Databases have several methods to ensure data integrity, including foreign keys, constraints, rules, and triggers. The system handles the relationship of these four well, using different methods for specific situations and relying on each other to complement each other's weaknesses.