← Bitkernel Interview Insights
The answer is B and I second-guessed myself for a bit.
Evaluate each statement against the formal definition of a primary key in the relational model, identifying the one that misstates a requirement. Recall that a primary key is a minimal set of columns that uniquely identifies each row and enforces entity integrity. The incorrect statement is (b) because uniqueness applies to the combination of columns, not to each column individually.
Pro tip: When answering, explicitly distinguish between 'unique' as a property of the entire key versus 'unique' as a property of each column, and mention that this nuance is a common source of confusion in database design discussions.
A primary key is a column or set of columns that uniquely identifies each row in a table and cannot contain NULL values.
Check each option against the definition: (a) NOT NULL is required for all key columns; (b) uniqueness is required for the key as a whole, not each column; (c) only one primary key per table; (d) primary keys can be defined at column or table level.
Statement (b) is incorrect because it claims every column in the primary key must be unique, which is false for composite keys where individual columns may have duplicates.
Explain why (b) is wrong and give an example of a composite primary key where individual columns are not unique, such as (OrderID, ProductID) in an order details table.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.