In a relational database, what is a “primary key” ?

2025

In a relational database, what is a “primary key” ?

  1. A.

    A key that uniquely identifies each record in a table

  2. B.

    A key used to link two tables together

  3. C.

    A key that can be null

  4. D.

    A key that stores primary data

Attempted by 286 students.

Show answer & explanation

Correct answer: A

A primary key is a fundamental concept in relational databases designed to ensure data integrity and uniqueness. It serves as the specific column or set of columns that uniquely identifies each row in a table, meaning no two records can share the same primary key value. This definition aligns perfectly with Option A, which states it is a key that uniquely identifies each record. Unlike foreign keys (Option B), which are used to link tables together, or candidate keys that might allow nulls depending on the specific database constraints (Option C), a primary key strictly enforces uniqueness and cannot contain null values. Option D is incorrect because the term "primary" refers to identification, not the type of data stored. Therefore, Option A is the correct answer as it accurately describes the core function of a primary key in database design.

Explore the full course: Niacl Ao It Specialist