I've something simple at this time, userdb schema is:

  • userid - autoincrement id email
  • current email address
  • password

I wish to incorporate Twitter and facebook, wouldso would i cope with it around the DB side?

This can be done many different ways, either you store the majority of the data inside a generic usertable (when you are going to) and also the provider particulars separated.

Or else you create a design where one can connect multiple logins to same user. This can finish track of something similar to

  • id user
  • id facebookuser (nullable)
  • id twitteruser (nullable)

This can maybe enable you to get N many e-mail adresses (but still no password! because you arent the provider from the account) or none whatsoever. It is dependent just how much this user trust you in every provider.

Edit: You could also wish to normalize the information without nullables. This can be done by getting

  • id_user
  • id_facebookuser id_user
  • id_twitteruser id_user