SpinTheMic
Pro

Interview practice question

Bad data slipped in without constraints

Backend Engineering · Relational Databases · Experienced

You discover thousands of orders with negative quantities and missing customers, because the table had no constraints. How do you clean up and prevent it?

What a strong answer covers

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

  • Find and fix bad rows (with business input).
  • Add CHECK and FK constraints NOT VALID.
  • Validate after cleanup.
  • Fix code paths that wrote bad data.
  • Monitor data quality.
Practise this topic

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

See all topics