GATE DA 2025 | Question 56

MSQ · 2 marks

Consider the following two relations, named Customer and Person, in a database:

Person (
    aadhaar CHAR(12) PRIMARY KEY,
    name VARCHAR(32));
Customer (
    name VARCHAR(32),
    email VARCHAR(32) PRIMARY KEY,
    phone CHAR(10),
    aadhaar CHAR(12),
      FOREIGN KEY (aadhaar) REFERENCES Person(aadhaar));

Which of the following statements is/are correct?

  1. Option A: aadhaar is a candidate key in the Customer relation
  2. Option B: phone can be NULL in the Customer relation (correct)
  3. Option C: aadhaar is a candidate key in the Person relation (correct)
  4. Option D: aadhaar can be NULL in the Person relation

Answer

(B), (C)

Explanation

Only the declared constraints restrict the columns.

  • A fails: the primary key of Customer is email, and aadhaar there is only a foreign key with no UNIQUE constraint. Several customer rows (say, one person with two email addresses) can share the same aadhaar, so it is not a candidate key.
  • B holds: phone has no NOT NULL or key constraint, so it may be NULL.
  • C holds: aadhaar is the primary key of Person, and a primary key is always a candidate key.
  • D fails: a primary key column can never be NULL.

Answer: B, C