GATE CSE 2021 Set 2 Q16: Foreign keys: how many per relation, and self-reference
- Databases
- 1 mark
- MCQ
- −1/3 if wrong
Question
Consider the following statements S1 and S2 about the relational data model:
S1: A relation scheme can have at most one foreign key.
S2: A foreign key in a relation scheme R cannot be used to refer to tuples of R.
Which one of the following choices is correct?
Try it: multiple choice: exactly one correct option
Show answer and explanation
Answer: D (official GATE 2021 final answer key)
Concept used: A relation may have several foreign keys, and a foreign key may refer to the same relation (self-referencing).
First step: Think of emp(empId, managerId, deptId): managerId refers to emp itself and deptId refers to dept.
Full step-by-step solution
Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.
Share this question
Source: official GATE 2021 Set 2 CS question paper and final answer key, organised by IIT Bombay. Question paper · Answer key
More Databases PYQs
- 2026 Session 1 · Q30Which functional dependency inferences always hold
- 2026 Session 1 · Q31Dependency-preserving decompositions for 1NF, 2NF, 3NF, BCNF
- 2026 Session 1 · Q43Relational algebra equivalent of a tuple calculus join query
- 2026 Session 1 · Q65Number of superkeys with candidate keys {A,B} and {A,C}
- 2026 Session 2 · Q15Match DBMS schema levels with what they describe
- 2026 Session 2 · Q20When two transactions do not conflict on a data item