Which statement about a primary key in a relational database is correct?

Prepare for the CGS Concepts Test with interactive quizzes. Use flashcards and multiple-choice questions, each with detailed explanations. Get exam-ready today!

Multiple Choice

Which statement about a primary key in a relational database is correct?

Explanation:
A primary key uniquely identifies each row in a table. Because of that, its values must be unique and non-null, and the key can be a single column or a combination of columns (a composite primary key). It doesn’t have to be numeric; any data type can serve as a primary key if it guarantees uniqueness. A foreign key, by contrast, references the primary key of another table to maintain relationships, but it is not required to be the same as the primary key of its own table. Since duplicates are not allowed in a primary key, and it must identify rows distinctly, the statement that it uniquely identifies each row is correct.

A primary key uniquely identifies each row in a table. Because of that, its values must be unique and non-null, and the key can be a single column or a combination of columns (a composite primary key). It doesn’t have to be numeric; any data type can serve as a primary key if it guarantees uniqueness. A foreign key, by contrast, references the primary key of another table to maintain relationships, but it is not required to be the same as the primary key of its own table. Since duplicates are not allowed in a primary key, and it must identify rows distinctly, the statement that it uniquely identifies each row is correct.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy