开发者

FK linking question

开发者 https://www.devze.com 2023-02-01 19:23 出处:网络
I have postal codes which is mapped to city_id country_id. I have city which is mapped to country_id. So in essence I can reach country from postal either directly through a FK or by jumping via the

I have postal codes which is mapped to

city_id

country_id.

I have city which is mapped to

country_id.

So in essence I can reach country from postal either directly through a FK or by jumping via the开发者_如何学JAVA city table. Any reason I should not go with what I have done and only have 1 link from postal to country, that is via city?


It's alright. It's design thing. Purist may complain redundancy, but there is no big deal, IMO.

0

精彩评论

暂无评论...
验证码 换一张
取 消