【发布时间】:2012-11-16 20:42:24
【问题描述】:
我有两种方法供用户在我的网站上创建帐户。
一个。普通登记表(邮箱、密码) 湾。通过 Facebook Connect 注册(fb_userid、电子邮件)
使用 MySQL(InnoDB 引擎)实现这一点的最佳实践是什么?
我的做法:
[USER]
user_id
user_type (normal/facebook)
[USER_NORMAL]
user_normal_id
user_id
email
password
[USER_FACEBOOK]
user_facebook_id
user_id
email
fb_userid
你有什么建议?
【问题讨论】:
标签: mysql database database-design single-table-inheritance class-table-inheritance