## 28.1.3 Implementing One-to-Many Relationships (cont.)

- Novice programmers often replicate columns:
  - Wastes space (1 or 2 items)
  - Doesn't solve problem (4 or 12 items)

Poor design for Invoice Table
Invoice_ Number | Customer_ Number | Product_ Code1 | Quantity1 | Product_ Code2 | Quantity2 | Product_ Code3 | Quantity3 | Payment
--- | --- | --- | --- | --- | --- | --- | --- | ---
`INTEGER` | `INTEGER` | `CHAR(10)` | `INTEGER` | `CHAR(10)` | `INTEGER` | `CHAR(10)` | `INTEGER` | `DECIMAL(10,2)`
11731 | 3175 | 116-064 | 3 | 257-535 | 1 | 643-119 | 2 | 0

prev |top |next