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

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -