Which key uniquely identifies a record in a table?

A. Foreign Key
B. Primary Key
C. Candidate Key
D. Super Key
Correct Answer: B. Primary Key

The key that uniquely identifies a record in a table is the Primary Key. A primary key is a special relational database table column (or combination of columns) designated to uniquely identify each row in the table. Its fundamental characteristics are:

  • Uniqueness: No two rows can have the same primary key value.
  • Non-nullability: A primary key cannot contain NULL values, ensuring every record has an identifier.

Other key types serve different purposes:

  • Foreign Key: Establishes a link between data in two tables, referencing the primary key of another table.
  • Candidate Key: Any column or set of columns that can uniquely identify a row. A primary key is chosen from the candidate keys.
  • Super Key: A set of attributes that uniquely identifies tuples in a relation. It can contain extra attributes that are not strictly necessary for unique identification.

The primary key is crucial for maintaining data integrity and establishing relationships between tables in a relational database.

Leave a Comment

Scroll to Top