DataLeaguebeta

Reading an ERD and the M:N relationship

choice10 pts

Below is a simplified ERD of an online shop:

EntityAttributes
customersid (PK), name, email
ordersid (PK), customer_id (FK), created_at
productsid (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?

Pick one option.