Let Constraints Protect Your Data
Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.
The problem
- easy
- Pro
The application code checks that every order belongs to a real customer and has a positive quantity, but the database still ends up with bad rows. Explain how foreign keys, unique, not null and check constraints help, and why checks in code alone aren't enough.
Talk this problem through with an AI coach
This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.