Let R1(a, b, c) and R2(x, y, z) be two relations in which ais the foreign key of R1 that refers to the primary key of R2 Consider the following four options
Which of the following is correct about the referential integrity constraint with respect to above?
Choose the correct answer from the options given below:
- Referential Integrity Constraint Violations:
- Given $R_1(a, b, c)$ where $a$ is a foreign key referencing the primary key of $R_2(x, y, z)$:
- Insert into $R_1$: Inserting a tuple with a foreign key value $a$ that does not exist in $R_2$ causes a referential integrity violation.
- Insert into $R_2$: Inserting into the referenced relation never violates referential integrity.
- Delete from $R_1$: Deleting from the referencing relation removes a reference and never causes a violation.
- Delete from $R_2$: Deleting a primary key tuple from $R_2$ that is currently referenced by tuples in $R_1$ leaves dangling references and causes a referential integrity violation.
- Therefore, operations (d) and (a) can cause violations.
- Conclusion: Operations (d) and (a) will cause violations (Option 4).
Correct option: (4) Operations (d) and (a) will cause violations