当父表和子表都对同一个表进行 FK 时,最佳做法是什么?
Parent > Child(ren)
CommonAttributes: Sex, Age, Height, Weight
直接引用公用表是不是更好:
CommonAttributes > Parent(s) > Child(ren)
&
CommonAttributes > Child(ren)
或使用参考表:
RefTable: CommonAttributes_Id, Parent_Id(null), Child_Id(null)
我认为第一种方法工作正常(关于 EF),但它有点循环引用。使用参考表来定义约束是否更好?