The GATE Grind

GATE 2021 CS (CS2) – Question 16

Databases · ER-Model and Database Architecture · 1 mark · Multiple choice

S1: A relation schema can have at most one foreign key. S2: A foreign key in schema R cannot refer to tuples of R itself. Which are true?

  1. Both
  2. S1 true,S2 false
  3. S1 false,S2 true
  4. Neither

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (D) Neither

Explanation

A relation can contain several foreign-key constraints referencing different relations or keys, so S1 is false. Self-referencing foreign keys are also valid, for example an employee’s manager ID referencing another employee row. Thus S2 is false and D is correct.

More ER-Model and Database Architecture questions

All ER-Model and Database Architecture questions →