🗄️ Database Design / Normalization
Intermediate
What are database anomalies and how does normalization prevent them?
Answer
Data anomalies are inconsistencies that arise from storing redundant data in poorly designed tables. Three types: Update anomaly — if the same fact is stored in multiple rows, updating one without updating others creates inconsistency (e.g., a department name stored in every employee row). Insert anomaly — cannot insert data without also including other unrelated data (e.g., cannot add a new department without an employee). Delete anomaly — deleting one fact accidentally deletes another (e.g., deleting the last employee in a department loses the department record). Normalization eliminates these by ensuring each fact is stored exactly once.
More Database Design / Normalization Questions
View all →- Intermediate What is denormalization and when is it used?
- Intermediate What are isolation levels in database transactions?
- Intermediate What are dirty reads, non-repeatable reads, and phantom reads?
- Intermediate What is query optimization and what is a query execution plan?
- Intermediate What is a covering index?