Explain Referential Integrity with the help of an example
Answers
Answered by
114
Explanation:
Referential integrity
It means the reference from a row in one table to another table must be valid. Examples of referential integrity constraint in the Customer/Order database of the Company: Customer(CustID, CustName)
Answered by
43
Referential integrity
Referential integrity constraint is also called a foreign key constraint. A reference key is a key whose values are generated from another table's primary key. The Master or Referenced Table is the table from which the values are derived, and the Child or Referencing Table is the table into which the values are entered.
Example:
- Consider the table Student (Roll Primary Key, Name, Course). Column Roll serves as the Primary Key, allowing the value of the foreign key in the child table to be determined.
- Take another table, Subject (Roll, Subject, SubName), for example. Column Roll acts as a Foreign Key in the table above, and its values are derived from it.
Similar questions
Math,
3 months ago
Social Sciences,
7 months ago
Math,
7 months ago
India Languages,
10 months ago
English,
10 months ago