Consider two relations r and s defined on the relational schemas R(A,B) and S(E,C), respectively. A is the primary key of R and E is a foreign key of S referencing A in R.
Which of the following operations will NEVER violate the foreign key constraint?
Correct answer: (A) Inserting records into relation r; (B) Deleting records from relation s
Explanation
The relation s holds the foreign key, so a row of s must refer to a row of r. Adding a row to r (the referenced table) cannot leave any row of s without a parent, and removing a row from s (the referencing table) cannot either. Removing a row from r can leave rows of s that point to it, and adding a row to s can refer to a key that does not exist in r.
More Integrity constraints and normal forms questions
GATE 2025 DA Q16– If a relational decomposition is not dependency-preserving, which one of the following…
GATE 2025 DA Q56– Consider the following two relations, named Customer and Person, in a database: Person…
GATE 2025 DA Q57– Consider a database relation R with attributes ABCDEFG, and having the following…
GATE 2024 DA Q46– Given the relational schema R = (U, V, W, X, Y, Z) and the set of functional dependencies:…
GATE 2026 DA Q17– Let R(A,B,C,D,E) be a relational schema with functional dependency set F = \A BC,\ CD E,\…