Skip to main content

GATE CSE 2021Databases › ER Modeling & Relational Model FundamentalsVerified

GATE CSE 2021 PYQ: Consider the following statements S 1 S1 S 1 and S 2 S2 S 2 about the relational data model: S 1 S1 S 1 : A…

Consider the following statements S1S1 and S2S2 about the relational data model:

  • S1S1: A relation scheme can have at most one foreign key.
  • S2S2: A foreign key in a relation scheme RR cannot be used to refer to tuples of R.R.

Which one of the following choices is correct?

  1. A
    Both S1S1 and S2S2 are true
  2. B
    S1S1 is true and S2S2 is false
  3. C
    S1S1 is false and S2S2 is true
  4. D
    Both S1S1 and S2S2 are false
    Correct answer

Answer

(D) Both S 1 S1 S 1 and S 2 S2 S 2 are false

Approach

Evaluate each statement about the relational model using the formal definition of a foreign key. A foreign key is a set of attributes in one relation whose values must match the primary key (or a candidate key) of some relation; nothing in the definition limits the number of foreign keys per scheme, and the referenced relation may be the same relation that contains the key.

The relational model permits any number of foreign keys in a relation scheme and explicitly allows a foreign key to reference the same relation (self-referencing key). Hence both S1 and S2 are false, making option D correct.

Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.