Previous Topic: ViewsNext Topic: Answers to Exercises


Data Integrity

Data integrity means correctness of data throughout the database. When you add data to a table, you want that data to be correct and consistent with other data in the table.

If you add an employee to the EMPLOYEE table, you want to make sure that the employee has an ID. Every employee must have an ID to keep the employee entries consistent with one another. This is an example of data integrity.

In other cases, the value in a given column cannot be repeated. The employee ID is unique for each employee; two employees cannot have the same ID. This is another example of data integrity.

To ensure that the data is consistent across tables, integrity constraints are set up as part of the data definition. The data you enter is checked against these constraints.