简体   繁体   中英

How do two many-to-one relationships work inside a ternary ERD diagram?

在此处输入图像描述

The arrows represent the many to one relationships.

From my understanding of the diagram:

Suppliers can only relate to one relationship of car and part. For example Tom's warehouse can only sell a steering wheel to a Ford truck. But Tom's warehouse selling a radio to the Ford truck can't happen due to the constraint.

The Ford truck can only be related to one relationship of a supplier and part. So the Ford truck can only have one supplier, supplying one part to the Ford truck.

How do two many-to-one relationships work inside a ternary ERD diagram?

In the family of ER modeling notations, your diagram uses Chen's notation . According to Chen himself:

A relationship set is a set of relationships of the same type. (...) A relationship set can also be defined on more than two entity sets. (...) In the entity-relationship diagram, a relationship set is represented by a diamond-shaped box with lines connecting to the related entity sets.

In Chen's notation, the "cardinalities" are indicated explicitly on the edges, with a 1, or a letter for many. According to your question, you assume that the relationship is N:M:1, then it means that:

  • for any given car and any given supplier, there may be only one part,
  • for any given part and any given supplier, there may be many cars,
  • for any given part and any given car, there may be many suppliers.

You can find more explanation in this article , which analysis the different possible cardinalities in a ternary relationship and explains that:

The cardinality constraint of an entity in a ternary relationship is defined by a pair of two entity instances associated with the other single entity instance.

Now, it seems important to underline that the arrow is not used by Chen (except for attributes). I know there are several extended ERD notation, but as far as I know, none associates arrow with multiplicity. So I'm not sure how you come to a N:M:1. Looking at the domain itself, I'd rather suspect a N:M:P.

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