Let R₁(a, b, c) and R₂(x, y, z) be relations in which a is a foreign key of R₁ referring to the primary key of R₂. Consider: (a) insert into R₁, (b) insert into R₂, (c) delete from R₁, (d) delete from R₂. Which is correct about the referential integrity constraint?
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: D. Operations (d) and (a) will cause violation.
Explanation
Inserting into the referencing table R₁ can introduce a value with no match, and deleting from the referenced table R₂ can orphan rows. Operations (a) and (d) can violate it.
More Database Management Systems questions
- Database systems that store each relation in a separate operating system file may use the operating system's authorization scheme, instead…
- A many-to-one relationship exists from entity set r₁ to entity set r₂. If Pk(r) denotes the primary key of relation r, how is it represente…
- For a database relation R(a, b, c, d) where the domains of a, b, c and d include only atomic values, and only the following functional depe…
- Consider the following schedules involving two transactions: S₁: r₁(X); r₁(Y); r₂(X); r₂(Y); w₂(Y); w₁(X) S₂: r₁(X); r₂(X); r₂(Y); w₂(Y); r…
- Relations produced from E - R Model will always be in ________.
- In a Hierachical database, a hashing function is used to locate the ________.