Interview practice question
Write skew in on-call scheduling
System Design · Databases · Experienced
An app requires at least one doctor on call. Two doctors each check "someone else is on call" and both go off call at the same time, leaving nobody. Why did transactions not prevent this?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Write skew anomaly.
- Snapshot isolation allows it.
- Each transaction read the same snapshot.
- Use serializable isolation.
- Or lock rows with SELECT FOR UPDATE / constraint table.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.