Challenger App

No.1 PSC Learning App

1M+ Downloads
A database designer wants to ensure that no two customers can have the some Aadhaar Number in a table. Identify the SQL constraint suitable for this requirement.

AUNIQUE

BNOT NULL

CCHECK

DDEFAULT

Answer:

A. UNIQUE

Read Explanation:

SQL Constraint for Uniqueness

  • The UNIQUE constraint is specifically designed to ensure that all values in a column are different, preventing duplicate entries across rows.
  • When applied to an Aadhaar Number field, it ensures data integrity by enforcing that no two records share the same identifier, which is critical for identity verification systems.
  • Key Characteristics of UNIQUE:
    1. It allows NULL values (unless a NOT NULL constraint is also explicitly applied).
    2. A table can have multiple UNIQUE constraints defined on different columns.
    3. It automatically creates a unique index on the specified column to optimize query performance during data retrieval and validation.
  • Comparison with PRIMARY KEY:
    • A PRIMARY KEY constraint also enforces uniqueness but automatically implies NOT NULL and allows only one such key per table.
    • While a PRIMARY KEY is used to uniquely identify a row, the UNIQUE constraint is preferred for columns like Aadhaar Number, PAN, or Email that are unique but not necessarily the primary identifier of the record.

Related Questions:

....... describes the physical storage structure of a database.
Which of the following statements about primary keys in a Relational Database Management System is true?
In a relational database, a Foreign Key is primarily used to
Which of the following is a Data Definition Language (DDL) command in database queries,
Program used to make executable file from a source file is called: