SpinTheMic
Pro

Interview practice question

Case-insensitive unique emails

Backend Engineering · Relational Databases · Intermediate

Users can sign up with "Asha@Mail.com" and "asha@mail.com" as different accounts. How do you prevent this?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Normalise email (lowercase) on write.
  • Unique index on LOWER(email).
  • Or citext type in Postgres.
  • Clean up existing duplicates.
  • Query using same normalisation.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics