沒有。抱歉。首先,您可能希望將「車輪」,「齒輪」,「制動器」視爲單個實體「零件」,而不是單獨的實體。
這使得圖更簡單。而且,記住,比可以有更多的部分,比如「鏈」,「燈」等等。
因此,不要爲每個零件定義一個sngle實體,只需定義一個:「零件」即可。
二,一些零件可以是另一零件的零件,依此類推。這被稱爲「遞歸」或「自引用」實體。起初,這可能看起來很奇怪,但也使圖更簡單。
............................................................
...........+-------------+..................................
...........|.............|..................................
...........|.............|..................................
.........../\............|.........../\.....................
........../ \...........|........../ \....................
........./ \.....Many.|....Many./ \...................
......../ \.1.+-----+----+.../ \...1+----------+..
.......<IsPartOf>--| Part +--<Stores>---+ Stock |..
........\ /...+----------+...\ /....+----------+..
.........\ /.........|..........\ /...................
..........\ /..........|Many.......\ /....................
...........\/...........|............\/.....................
......................./ \.................................
....................../ \................................
...................../ \...............................
..................../ \..............................
...................<Composed>.............................
....................\ By /..............................
.....................\ /...............................
......................\ /................................
.......................\../.................................
........................|...................................
........................|1..................................
...................+----------+.............................
...................| Bike |.............................
...................+----------+.............................
............................................................
乾杯。
偉大的解決方案。謝謝 – barto90