CompTIA Tech+ (FC0-U71)Data and Database FundamentalsEasy
A technician is designing a new Employees table and must choose a column that will always contain a unique, non-repeating value to identify each row. Which column is the best choice for this purpose?
- AHire Date, because it records when they joined
- BLast Name, because it clearly identifies the person
- CDepartment, because it groups employees logically
- DEmployee ID, because each employee has a unique identifier
Show answer & explanationAnswer & explanation
Correct answer: D. Employee ID, because each employee has a unique identifier
A primary key must uniquely identify each record, and Employee ID is designed specifically to be unique for every employee. Last names can repeat, departments group many employees, and hire dates can also repeat across employees.
Why the other options are wrong
- A. Multiple employees can share the same hire date.
- B. Last names are not guaranteed to be unique among employees.
- C. Department values repeat across many employees, so not unique.
Primary Key
A primary key is a column (or set of columns) in a table that uniquely identifies each record and cannot contain duplicate or null values.
- Must be unique for every row
- Cannot be null
- Often an ID number or auto-generated code
Memory trick: Primary Key = Personal ID, one-of-a-kind