GATE DA 2026 | Question 26
Database Management and Warehousing › Integrity Constraints · MSQ · 1 mark · Answer: A, B
- Question 26Database Management and Warehousingmsq1 markConsider 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?
- A.Inserting records into relation r✓
- B.Deleting records from relation s✓
- C.Deleting records from relation r
- D.Inserting records into relation s
Answer: A, B
Solution
The constraint is: every value of in must exist as some in . - Inserting into (the referenced table) only adds possible targets. It never violates. - Deleting from (the referencing table) removes references. It never violates. - Deleting from can remove an value that some row of still refers to. It can violate. - Inserting into can add an value that does not exist in . It can violate. Answer: (A), (B). - A.
Attempt GATE DA 2026 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →