Explain what normalization means in SQL and why it matters.
Describe the main normalization principles, then use the provided payment schema to show how customer, payment method, and payment data are separated. Write a query that returns the payment details needed for analysis from the normalized tables.
payment_id, customer_name, payment_method, amount, payment_status, merchant_referencepayment_id ascending.| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer display name |
| city | VARCHAR(80) | Customer city |
| Column | Type | Description |
|---|---|---|
| payment_method_idPK | INT | Unique payment method identifier |
| method_name | VARCHAR(40) | Payment method name |
| provider | VARCHAR(60) | Payment method provider |
| Column | Type | Description |
|---|---|---|
| payment_idPK | INT | Unique payment identifier |
| customer_id | INT | References customers.customer_id |
| payment_method_id | INT | References payment_methods.payment_method_id |
| amount | NUMERIC(10,2) | Payment amount |
| payment_status | VARCHAR(20) | Payment processing status |
| merchant_reference | VARCHAR(40) | Optional merchant reference |