GATE DA 2025 · Integrity Constraints

MSQ · 2 marks · Problem DBMS-NORM-0032

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. A
    aadhaar is a candidate key in the Customer relation
  2. B
    phone can be NULL in the Customer relation
  3. C
    aadhaar is a candidate key in the Person relation
  4. D
    aadhaar can be NULL in the Person relation

Solve it on GATE DA practice →More Relational Model & SQL problems

Show the worked solution\(\text{Person}(\underline{\text{aadhaar}},\text{name})\), \(\text{Customer}(\text{name},\underline{\text{email}},\text{phone},\text{aadhaar}\to\text{Person.aadhaar})\)"aadhaar is a candidate key in Customer": false — it's just a foreign key there; the schema doesn't declare it unique in Customer (only \(\text{email}\) is the primary key)."phone can be NULL in Customer": true — \(\text{phone}\) has no NOT NULL or key constraint declared."aadhaar is a candidate key in Person": true — it's explicitly declared the primary key of Person, and every primary key is by definition a candidate key."aadhaar can be NULL in Person": false — primary keys can never be NULL by the standard SQL constraint.Answer: phone can be NULL in Customer; and aadhaar is a candidate key in Person.Click Here for Detail SolutionGateOverflow discussion: https://gateoverflow.in/460976/gate-da-2025-question-46

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com