Data Integrity Enforcing data integrity ensures the quality
Data Integrity - Enforcing data integrity ensures the quality of the data in the database. Data integrity falls into what four categories? What are some key features of each of these categories.
Solution
Data Integrity: Data integrity refers to the overall completeness, accuracy and consistency of data.
The accuracy and consistency of stored data, indicated by an absence of any alteration in data between two updates of a data record. Data integrity is imposed within a database at its design stage through the use of standard rules and procedures, and is maintained through the use of error checking and validation routines.
Data integrity is the opposite of data corruption, which is a form of data loss. The overall intent of any data integrity technique is the same: ensure data is recorded exactly as intended.
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.
Data Integrity is enforced by database constraints.
Categories of Data Integrity:
There are four types of data integrity:
Row Integrity: Row integrity enforces that all rows in a table must have a unique identifier that can differentiate each record from others. This unique identifier is normally known as Primary Key of the table. A Primary Key can be a single column or a combination of multiple columns.
Column integrity: Column integrity enforces that data stored in a column must have same format and definition. This includes data type, data length, range of possible values, default value of data, whether duplicate values are allowed, or whether null values are allowed.
Referential Integrity: This is the concept of foreign keys. The rule 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: This states that all columns in a relational database are in a defined domain.
