A database designer wants to ensure that no two employees have the same email address. Which constraint should be applied to the Email column?
UNIQUE constraint ensures no duplicate email addresses.
Why this answer
The UNIQUE constraint ensures that all values in the Email column are distinct, preventing any two employees from having the same email address. Unlike PRIMARY KEY, UNIQUE allows NULL values (though typically email columns are set to NOT NULL), and it can be applied to non-key columns. This directly enforces the business rule of unique email addresses without requiring the column to be the table's primary identifier.
Exam trap
The trap here is that candidates often confuse UNIQUE with PRIMARY KEY, assuming uniqueness can only be enforced by a primary key, but PRIMARY KEY imposes additional non-null and single-per-table restrictions that are not required for simply ensuring unique email addresses.
How to eliminate wrong answers
Option B (PRIMARY KEY) is wrong because while it also enforces uniqueness, it additionally requires the column to be non-null and uniquely identify each row, which is not necessary for just ensuring unique emails; the Email column may not be the natural primary key. Option C (CHECK) is wrong because CHECK constraints validate data against a Boolean expression (e.g., ensuring email format contains '@'), but they cannot enforce uniqueness across rows. Option D (FOREIGN KEY) is wrong because it enforces referential integrity between tables by requiring values in the Email column to match values in another table's primary key or unique column, which does not prevent duplicate emails within the same table.