Posted in Information Technology & Systems, Total Reads: 400
Definition: Data Integrity
It refers to the completeness, consistency and accuracy of the data stored in database or data warehouse. It means that whatever updates and changes is made on the data is validated on various constraints and error checking methods. These integrity constraints are described as below:
Entity integrity: Every table must have one primary key (or a composite primary key) which should be unique and not null. In table employee emp_id is primary key and in table department dept_id is primary key which are not null.
Referential integrity: There may be foreign key in certain tables which can either be primary key of some other table or can be null. In table department the primary key dept_id is the foreign key of table employee.
Domain Integrity: This states that all columns in the database can contain a defined domain of values. In both the tables all the fields are bound to certain constraints and can contain data which is validated by those constraints only.