简体   繁体   中英

Cardinality in ER Diagram / 1 to many

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]

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]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM