In Database Systems What Is Meant By Referential Integrity?

1

1 Answers

raaga Profile
raaga answered
Referential integrity is a rule that also helps in maintaining the organized form of data. It preserves the relationships defined between the data entities during the data updates. In the case of relational data model, relations/tables are the data entities. All these entities in a database are connected with on another via one or more attributes. These attributes are normally called 'primary key 'of the table.    By applying the rules of referential integrity, you ensures that no any update can  be effective that destroy the relations defined between tables , i.e. No any value of foreign key can be entered that does not has a corresponding primary key value in the related table.  In a database, data is stored in more than one relation, thus complete information about an entity may be stored in more than one tables. When two relations/tables are linked with each other through a relationship, one is called a master table and other is called child table.    The referential integrity rules are used in such cases to provide the following advantages:  1. If the record does not exist in master table, it can not be stored in child table.  2. A record can not be deleted from master table unless that record is deleted first from relevant child table.

Answer Question

Anonymous