Referential Integrity


☞ It is used to maintain accuracy and consistency of data in a relationship.

Principle :- No unmatched foreign key values should exist in the database.

☞ To maintain referential integrity, LibreOffice Base gives four options :

  1. No action :
    • This is the default option.
    • It states that a user should not be allowed to update or delete any record in the master table if any related record exist in the transaction table.
  2. Update cascade :
    • This option allows the user to delete or update the referenced field but along with it all the related records in any of the transaction tables will also be deleted or updated.
  3. Set NULL :
    • This option assigns NULL value to all the related fields if the master record is deleted or updated.
  4. Set default :
    • This option assigns any fixed default value to all the related fields if the master record is deleted or updated.