Choose a Primary Key

Talk it through out loud with your AI coach.

The problem

  • easy

You're designing a users table and a colleague suggests using the email address as the primary key. Explain what a primary key is for, the difference between natural and surrogate keys, and what you'd choose here.

What a strong answer covers

  • What a primary key guarantees and who relies on it.
  • The difference between keys taken from real data and keys invented by the system.
  • What goes wrong when a key's real-world value changes.
  • A recommendation that keeps uniqueness without the downsides, and its trade-offs.

Common mistake: Picking a business value as the key because it looks unique, forgetting that people change it.

Knowing this is half of it. Saying it clearly out loud is the part the coach helps you practise.

Practise it out loud