A unique identifier for a record in a database table, ensuring that no two records have the same key.

Prepare for the GATE General Aptitude and CS Test. Study with comprehensive multiple-choice questions, each equipped with hints and explanations. Master your exam!

Multiple Choice

A unique identifier for a record in a database table, ensuring that no two records have the same key.

Explanation:
The idea being tested is the way a table guarantees a single, unambiguous identity for each row. A primary key serves this role: it is a specific field (or combination of fields) that uniquely identifies every record in the table, and it cannot be null. This ensures entity integrity—no two rows share the same key, so you can reliably fetch, update, or relate a specific record. Other options don’t fit as cleanly. A foreign key points to a key in another table and doesn’t uniquely identify a row within its own table. A candidate key is any attribute (or set of attributes) that could serve as a primary key; there can be several, but one is chosen as the primary key. A unique constraint enforces uniqueness of values in a column (or set of columns) but may allow nulls in many database systems and isn’t chosen to serve as the main identifier for the row. So the best choice is the primary key.

The idea being tested is the way a table guarantees a single, unambiguous identity for each row. A primary key serves this role: it is a specific field (or combination of fields) that uniquely identifies every record in the table, and it cannot be null. This ensures entity integrity—no two rows share the same key, so you can reliably fetch, update, or relate a specific record.

Other options don’t fit as cleanly. A foreign key points to a key in another table and doesn’t uniquely identify a row within its own table. A candidate key is any attribute (or set of attributes) that could serve as a primary key; there can be several, but one is chosen as the primary key. A unique constraint enforces uniqueness of values in a column (or set of columns) but may allow nulls in many database systems and isn’t chosen to serve as the main identifier for the row.

So the best choice is the primary key.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy