Ask Question
16 December, 06:36

What is a foreign key and how does it provide referential integrity?

+5
Answers (1)
  1. 16 December, 10:27
    0
    By definition a foreign key of table A is a primary key of another table B, thereby establishing a link between them.

    To provide referential integrity you can use these referential actions:

    Cascade: If rows in table B are deleted, the matching foreign key columns in table A are deleted. Set Null: If rows in table B are deleted, the matching foreign key columns in table A are set to null. Set Default: If rows in table B are deleted, the matching foreign key columns in table A are set with the default value of the column. Restrict: A value in table B cannot be deleted or updated while as it is referred to by a foreign key in table A.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “What is a foreign key and how does it provide referential integrity? ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers