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?

Show Hint

Self-referencing foreign keys are common in recursive relationships such as organizational hierarchies.
Updated On: Dec 29, 2025
  • Both S1 and S2 are true.
  • S1 is true and S2 is false.
  • S1 is false and S2 is true.
  • Both S1 and S2 are false.
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

Step 1: Evaluate Statement S1.
A relation schema can have multiple foreign keys. For example, a table may reference multiple other tables, each via a different foreign key. Hence, S1 is false.

Step 2: Evaluate Statement S2.
A foreign key can reference the same relation (self-referencing foreign key), as in hierarchical or recursive relationships (e.g., an \texttt{Employee} table with a \texttt{ManagerID} referencing \texttt{EmployeeID}). Hence, S2 is false.

Step 3: Conclusion.
Since both S1 and S2 are false, the correct option is (D).

Was this answer helpful?
0
0

Questions Asked in GATE CS exam

View More Questions