例子:
学生
studentId
name
工作人员
staffId
name
帐号
accountId
foreignKeyId(studentId or staffId)
username
password
usertype
最佳答案
恕我直言,奇怪的设计选择。你最好一路走下去:
Account
-------
accountid
username
password
usertype
...
Student
-------
studentid
accountid
name
...
Staff
-----
staffid
accountid
name
...
关于mysql - 属性中可以有两个外键吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14228527/