Learn SQL Lesson
Feel the Update Anomaly
Let's make the update problem concrete. In the bad schema below, customer details are copied into every order row.
If Alice moves from Berlin to Munich, you do not update one customer record. You must find every row where Alice appears and change all of them. Missing just one row leaves the database in an inconsistent state.
Load the sample data and query the rows that would need to be changed. You should notice that one real-world fact — Alice's `customer_city` — is duplicated across multiple order rows.
Practice challenge
Return the rows that would need updating if Alice Kim changed cities. Show order_id, customer_name, and customer_city, ordered by order_id.