Total Pageviews

Referential Integrity

In the case of Relational Database Management System, we have to maintain the relation across the table. Tables are related to each other on the basis of logical relationship. We maintain the relationship across the table to avoid having corrupt, irrelevant data to maintain the data integrity in our system.

Here Referential Integrity comes into the picture.

In the case of referential integrity, one table behaves like a parent table and another one behaves like a child table. Referential integrity enforces to have the defined relationships between tables when rows are entered or deleted. Referential Integrity maintains the key value, consistent across the table. The consistency will be in such manner that the child table should not have any value which is not referring to key value of parent table. If the key value gets changed in Parent table then the references to the key value should change accordingly.

No comments:

Post a Comment