Home  >  Q&A  >  body text

mysql - ER图中的三元关系中两两之间的联系如何表示?

比如说船舶给货主运输货物, 这个三元关系如果不加映射基数的话,写出来应该是这样的:,但是一艘货船可以给多个货主运输多批货物,一个货主可以有多批货物要运输,也就是需要多艘船舶,所以船舶和货主之间的联系是多对多,船舶和货物的关系是1对多;但是一批货只能交给一艘货船来运输,一批货物只能有一个货主。 那么对于这种联系该怎么在ER图中体现呢?

PHP中文网PHP中文网2712 days ago637

reply all(2)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 13:03:27

    In this example, the relationship between the cargo and the cargo owner is obviously much closer than the relationship between the ship and the cargo {owner, object}

    The cargo owner has one-to-many (ownership) of the goods
    Ship to cargo one-to-many (transportation)

    Three yuan reduced to two yuan, over

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 13:03:27

    Quantities are all many-to-many, and there is a ternary relationship between three entities. Associations can be used to indicate

    reply
    0
  • Cancelreply