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
Business Studies,
4 months ago
Math,
4 months ago
Social Sciences,
8 months ago
Math,
8 months ago
India Languages,
11 months ago
English,
11 months ago