Integrity rules in RDBMS


What is RDBMS ?

RDBMS stands for Relational database management system. RDBMS stores data performs every query related to data, manages data, and retrieves data. RDBMS provides an interface between user and application to interact easily.

Data integrity

Data integrity refers to checking whether the data is accurate or not. Also, it contains data consistency by applying some rules to the data entered by the user. For data integrity, data validation is critical. Data integrity has two types:

  • Physical integrity : It checks the physical things related to data, like storing data and retrieving it appropriately or not.
  • Logical integrity : Logical integrity refers to the validation and correctness of data by applying some rules to it.

Types of integrity

Data integrity refers to checking whether the data is accurate or not. Also, it checks the consistency of data by applying some rules on the data entered by the user. For data integrity, data validation is very important. Data integrity has two types,

  • Entity integrity : This type of integrity deals with primary key constraints. It states that each table has one primary key to the column where we need unique values.
  • Referential integrity : Referential integrity works on foreign key constraints. This refers to the fact that foreign keys always have one value out of two.
  • Domain integrity : Domain integrity forces that the column made in the database have to be made on the selected domain.