GATE DA 2026 · Integrity Constraints

MSQ · 1 mark · Problem DBMS-NORM-0035

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 \(\textbf{NEVER}\) violate the foreign key constraint?
  1. A
    Inserting records into relation \(r\)
  2. B
    Deleting records from relation \(s\)
  3. C
    Deleting records from relation \(r\)
  4. D
    Inserting records into relation \(s\)

Solve it on GATE DA practice →More Relational Model & SQL problems

Show the worked solutionThe foreign key constraint requires: every value of \(E\) in \(s\) must match some existing value of \(A\) in \(r\).• Inserting into \(r\): only adds new valid primary-key values to \(R\); existing references in \(s\) remain valid, and no new invalid reference can be created this way. Never violates.• Deleting from \(s\): only removes rows from the referencing side; this can't create a dangling reference (it can only reduce them). Never violates.• Deleting from \(r\): could remove an \(A\) value that some row in \(s\) still references via \(E\), creating a dangling foreign key. Can violate.• Inserting into \(s\): the new row's \(E\) value might not match any existing \(A\) value in \(r\). Can violate.Answer: Inserting into r, and deleting from s, will NEVER violate the constraint.Click Here for Detail SolutionGateOverflow discussion: https://gateoverflow.in/523199/gate-da-2026-question-16

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com