mysql - Whats an efficent way to put multiple types of users in a db -


i'm building website have users logging site multiple sources, including facebook , google+ , want able keep basic info on each user in data base, can track creation of things comments , posts. how efficiently in sql database. create new table each type of user?

the usual approach is:

  • a user table common data
  • a facebook_user table (which has it's own pk , user fk) facebook specific data
  • a google_user table...

when loading user, can join tables or can create view contains join or, if have many special types, can load user , read others individually (maybe keep is_x_user in user table speed up).


Comments