Question

Consider the following statements S1S_1 and S2S_2 about the relational data model:

S1S_1: A relation scheme can have at most one foreign key.

S2S_2: A foreign key in a relation scheme RR cannot be used to refer to tuples of RR.

Which one of the following choices is correct?

Choose one option
Official answer and solution
Official answer
D
From
Official GATE 2021 answer key

Solution

Evaluate standard relational database definitions regarding foreign key constraints and self-referential relationships.

Statement S1S_1 states that a relation scheme can have at most one foreign key. This is false. A relation scheme can contain multiple foreign keys referencing candidate keys in different relations or the same relation (for instance, an Enrollment table referencing both Student and Course).

Statement S2S_2 states that a foreign key in a relation scheme RR cannot be used to refer to tuples of RR. This is also false. A foreign key can reference the primary key of its own relation, known as a self-referencing foreign key or recursive foreign key (for instance, an Employee table where attribute manager_id references emp_id of the same Employee table).

Therefore, both statements S1S_1 and S2S_2 are false, which corresponds to option D.

Final answer

D

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2021 Computer Science and Information Technology - Session 2 (CS2)
Question
16 of 65, printed as CS Q.6
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.