Normalization 是组织数据的过程,目的是通过将数据分割成相关表来减少冗余并提高完整性,遵循一系列"范式"。目标:每条数据只存储一次,避免重复和由此引起的异常。
问题:未规范化(冗余)的表
❌ orders table with everything in one place — data is DUPLICATED:
order_id | customer_name | customer_email | product | price
1 | Ann | [email protected] | Phone | 999
2 | Ann | [email protected] | Case | 20 ← Ann's info repeated!
Problems (anomalies):
✗ UPDATE anomaly — change Ann's email → must update EVERY one of her orders
✗ INSERT anomaly — can't add a customer without an order
✗ DELETE anomaly — deleting Ann's last order loses her info entirely
✗ Wasted storage and inconsistency risk
