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

333 Views Asked by At

enter image description here

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?

1

There are 1 best solutions below

0
Christophe On

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.