阅读背景:

用外键作为主键可以吗?

来源:互联网 

I have table "User" (username, password) and table "Profile" (profileId, gender, dateofbirth,...). Currently I'm using this approach: each Profile record has a field named "userId" as foreign key which links to the User table. When an user registers, his Profile record is automatically created. I'm confused with my friend suggestion: to have the "userId" field as the foreign and primary key and delete the "profileId" field. Which approach is better ?I have table "User" (username, password) and ta




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: