Reading an ERD and the M:N relationship
choice10 pts
Below is a simplified ERD of an online shop:
| Entity | Attributes |
|---|---|
| customers | id (PK), name, email |
| orders | id (PK), customer_id (FK), created_at |
| products | id (PK), name, unit_price |
Relationships:
- One customer has many orders, each order belongs to one customer (1:N).
- One order contains many products and one product appears in many orders (M:N).
How do you store the relationship between orders and products in a relational database?