考虑到订单记录的数量比标签大很多数量级:

- a. I also recall having read that many-to-many relationships cost the most in resources and don’t perform well yet also read claims that the performance losses are negligible and not worth the risk and overhead of handling orphan records of many-to-many relationships, any comments?
- b. Based on other readings I was convinced to model a many-to-many via making 2 one-to-many tables with a joint table of FKs, if there is no longer a many-to-many but 2 one-to-many tables are the aforementioned cons of many-to-many avoided?
我想摆脱我读过的矛盾和自动矛盾的帖子。
发布于 2016-08-31 05:15:03
世界是一个复杂的地方,你的问题假设所有问题都有一个答案。事实上,对于你所问的问题,答案是一对多的。
至于剩下的1,这取决于你正在处理的数据有什么意义--谁可以说在一般情况下。
发布于 2016-08-31 08:53:33
根据您的形象,我要说,tblTAG和tblOrder之间有一对多的关系。在这张图片中,我没有看到多到多的关系,添加这些记录根本不会产生任何问题。
tblTAG.TagID 1可以在tblORDER中存在任意多次,而不存在任何问题。也是一个类似于
select * from tblORDER where TagID = 1执行速度非常快,因为tblORDER中的外键将创建一个索引。
那么,为什么这里需要多到多的关系呢?
https://stackoverflow.com/questions/39240823
复制相似问题