All Exams Test series for 1 year @ ₹349 only
Question

In a relational database model, NULL values can be used for all but which one of the following ?

The correct answer is
To allow duplicate tuples in the table by filling the primary key column(s) with NULL.

Relational Database NULL Values: Primary Key Constraint

In relational databases, a primary key column uniquely identifies each row (tuple) in a table. A fundamental rule for primary keys is that they cannot contain NULL values. This ensures that every row has a distinct identifier.

Analysis of NULL Value Usage

  • Option A: States NULL can be used to allow duplicate tuples via the primary key. This is incorrect. Primary keys must be unique and cannot be NULL. Allowing NULL in a primary key would violate uniqueness and lead to duplicate rows, which contradicts the purpose of a primary key.
  • Option B: States NULL avoids confusion with values like 0 or "". This is a valid use. NULL represents an unknown or missing value, distinct from actual data like zero or an empty string.
  • Option C: States NULL represents unknown values. This is a primary purpose of NULL values in databases.
  • Option D: States NULL fills columns that don't apply to a specific tuple. This is also a valid use for optional attributes.

Conclusion on NULL Restrictions

The only scenario listed where NULL values cannot and should not be used is within the primary key column(s), as it violates the core principles of uniqueness and entity integrity.

Was this answer helpful?

Important Questions from Integrity Constraints and Normal Form

  1. The ________ normal form is based on the concept of transitive dependency.
  2. In RDBMS, the constraint that no key attribute (column) may be NULL is referred to as :
  3. Match the following with respect to RDBMS:

    A. Entity integrity

    1. Application-specific business rules beyond the general entity, domain and referential constraints

    B. Domain integrity

    2. Foreign-key values must match a referenced key, except where NULL is permitted

    C. Referential integrity

    3. Column values must satisfy the defined domain

    D. User defined integrity

    4. Primary-key values must be unique and non-NULL

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App