Which is true about the primary key?
-
Every table should have a primary key.
-
A primary key exclusively identifies each row in a table.
-
A primary key can be made of multiple fields.
-
Both a and b.
-
All of the above.
A primary key is essential for database integrity and should be present in every table. It uniquely identifies each row, preventing duplicate records, and can consist of multiple fields for composite keys when a single field is insufficient.
Evaluate each statement. (b) 'A primary key exclusively (uniquely) identifies each row' is true by definition. (c) 'A primary key can be made of multiple fields' is true (a composite/compound primary key). (a) 'Every table should have a primary key' is phrased as a 'should' best-practice recommendation, which is the standard teaching in relational database courses and design guidance; as a best-practice statement it is treated as true. Since (a), (b) and (c) are all considered true, the compound options 'Both a and b' and finally 'All of the above' follow, and 'All of the above' is the most complete correct choice. The DB's marked answer 'All of the above' is correct. (The critique that (a) is only best practice, not a hard requirement, is valid pedantry, but the 'should' wording makes it a recommendation that quizzes accept as true.)