I've couple of tables like example.

Users    Books    UsersBookPurchase
UID      BookId   UserId 
UName    Name     BookId
Password Price

This really is fine. I'm getting my very own login system however i am also with a couple third party to validate like OpenID or facebook Authetication. My real question is when the user has the capacity to sign in effectively using OpenID or facebook Authentication, what steps should i will i.at the must i place one fake row in Customers table if i don't place the way integrity be maintained. I am talking about what user id must i place in UsersBookPurchase when the one who has drenched in making use of Facebook Authentication makes an order since the UserId is reference key from Customers table. Please produce an advanced summary of what i have to do since this is not unheard of scenario.

Thanks ahead of time :)

Essentially yes. Don't think about it as being an imitation row. List of positive actions would be to create a real user account in line with the data supplied by Facebook API (I'm not that acquainted with OpenID)

Facebook API provides you with first and surname, current email address, maybe another data Facebook doesn't have the idea of login title, customers login by current email address.

That which you do is simply produce a new user in the data supplied by API.

You will find several things to watchout for: it's possible that user has already been registered in your site. When you are getting data from Facebook you need to search your personal user table to ascertain if the e-mail address already goes for your own registered user also it that situation that you can do some fancy such things as mark that user as also getting a facebook login.

Basically were to achieve that, I'd abstracted login info right into a separate table and also have some kind of enter in the User table. The kind can be used to recognize what auth technique is used, i.e. your personal, Google, etc. If your user does choose using alternative techniques, you need to have association however with another type. But yes it's a new record.