Integrity constraints ensure that changes made to the database by authorized…

2017

Integrity constraints ensure that changes made to the database by authorized users do not result into loss of data consistency. Which of the following statement(s) is (are) true w.r.t. the examples of integrity constraints ?

(A) An instructor Id. No. cannot be null, provided Instructor Id No. being primary key.

(B) No two citizens have same Aadhar-Id.

(C) Budget of a company must be zero.

  1. A.

    (A), (B) and (C) are true.

  2. B.

    (A) false, (B) and (C) are true.

  3. C.

    (A) and (B) are true; (C) false.

  4. D.

    (A), (B) and (C) are false.

Attempted by 934 students.

Show answer & explanation

Correct answer: C

Answer: The examples stating that an instructor ID cannot be NULL when it is a primary key and that no two citizens have the same Aadhar-ID are true; the statement that a company's budget must be zero is false.

  • Instructor ID cannot be NULL when declared as a primary key: Primary key implies NOT NULL, so this is a valid integrity constraint.

  • No two citizens have the same Aadhar-ID: this is an example of a uniqueness (or key) constraint that prevents duplicate identifiers for distinct entities, so it is a valid integrity constraint.

  • Budget of a company must be zero: this is not a reasonable general integrity constraint. It is an arbitrary business rule and would normally be incorrect; a more typical domain constraint might restrict budget to be non-negative (budget >= 0) rather than forcing it to zero.

Explore the full course: Mppsc Assistant Professor