Home TechnologyProgrammingSQL & Databases Subscribe to RSS

In Database Systems What Is Meant By Referential Integrity?

What do you know about it?

Answer Question

1 Answer - Sort by: Date | Rating

    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.
    0 0

    Raaga 

    answered 3 years ago

      More

      More

         
         

        Ask a Question via Twitter

        Send a question to @askblurtit and we will publish it online and send you a reply everytime you receive an answer.

        Blurtit Store

        Get T-shirts, hoodies, caps and more at the Blurtit store