One document, two related tables
Illustrative exampleEach order becomes a row. The items array nested inside every order becomes a related table, with one row per item.
| id | customer | total |
|---|---|---|
| 1001 | Ada | 59.9 |
| 1002 | Grace | 189 |
| order | sku | qty |
|---|---|---|
| 1001 | KB-1 | 1 |
| 1001 | MS-2 | 2 |
| 1002 | MN-3 | 1 |
