i****a 发帖数: 36252 | 1 TableA
Col_PK
TableB
Col_PK
Col_FK -> TableA.Col_PK
TableC
Col_FK -> TableB.Col_PK (this is necessary)
Col_FK2 -> TableA.Col_PK (this is optional. should I create this FK?) |
B*****g 发帖数: 34098 | 2 FK的作用是啥?
【在 i****a 的大作中提到】 : TableA : Col_PK : TableB : Col_PK : Col_FK -> TableA.Col_PK : TableC : Col_FK -> TableB.Col_PK (this is necessary) : Col_FK2 -> TableA.Col_PK (this is optional. should I create this FK?)
|
i****a 发帖数: 36252 | 3 if I create the extra FK, can reduce a table join when i only need results
from TableA and TableC, and that's the most frequently used join. Is there
any design principle against doing that?
【在 B*****g 的大作中提到】 : FK的作用是啥?
|
B*****g 发帖数: 34098 | 4 没听说过FK有这好处,有link吗?
【在 i****a 的大作中提到】 : if I create the extra FK, can reduce a table join when i only need results : from TableA and TableC, and that's the most frequently used join. Is there : any design principle against doing that?
|
a**4 发帖数: 1050 | |
i****a 发帖数: 36252 | 6 我还是老老实实 follow normalization 吧
【在 B*****g 的大作中提到】 : 没听说过FK有这好处,有link吗?
|