开发者

In which table will be foreign key if the relation in two tables is many to one i.e. from 1st table (many ) to second table(one)

In which table will be foreign key if the relation in two tables is many to one i.e. from 1st table (man开发者_如何学编程y ) to second table(one).


The 1st table. What do I win??!


The foreign key will be in the first table i.e. your many table.


Foreign keys are in tables that reference other tables, so in your case it will be in "many"-table. Don't be fooled by cardinality - there can be foreign key defined in 1:1 relationship.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜