mysql - ER图中的三元关系中两两之间的联系如何表示?
PHP中文网
PHP中文网 2017-04-17 13:01:27
0
2
625

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

PHP中文网
PHP中文网

认证0级讲师

reply all(2)
大家讲道理

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

刘奇

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!