Data Integrity
Data integrity ensures in which the data entered into the database through the user is checked for it’s correctness and is the data which is supposed to go into the database. Therefore, the data gets automatically validated when it is entered as per the instructions or commands of the designer and through this way RDBMS ensures which the application is of a high degree of integrity and data security.RDBMS ensures data integrity by automatic validation of data using integrity constraints. Integrity constraints are non-procedural constructs and through just specifying those and the designer can automate the validation procedure at the time of data entry. Popular integrity constraints are UNIQUE, NOT NULL, FOREIGN KEY PRIMARY KEY and CHECK constraints.
Data integrity described into the following categories which are given below:
- Entity integrity
- Domain integrity
- Referential integrity
Entity integrity
Entity integrity ensures that each row can be uniquely identified through an attribute known as the primary key. A primary key cannot have a NULL value.
Domain Integrity
Domain integrity refers to the range of valid entries for a provided column. It ensures which there are only valid entries in the column.
Referential integrity
Referential integrity are ensures for every value of a foreign key where there is a matching value of the primary key.