0

I'm trying to create my first ER diagram but I am confused what type of cardinality I should use.

The entities are: Order and Product

The assumption is that each order can include one or many products

Should the cardinality between order and product be 1:N or N:M ?

[Order]--1--includes--N--[Product]

MartinLo
  • 1
  • 1
  • There have been many examples of this type of relationship between Order and Product. You can add an additional OrderDetail. The ERD should look like this: [Order] -1-N-[OrderDetail]-N-1-[Product]. Ex: NorthWind database: https://documentation.red-gate.com/dms6/data-mask – charlesdk Sep 28 '22 at 09:43

1 Answers1

0

The following notation

[Order]--1--includes--N--[Product]

says that a product can be included in 1 order and an order can include N products. This corresponds to a 1:N cardinality.

However this does not correspond to the reality of the order/product relationship. A same product can in general appear in many orders. And an order can have many products. So the cardinality should be N:M:

[Order]--N--includes--M--[Product]
Christophe
  • 68,716
  • 7
  • 72
  • 138