Do i need to insert one fake row in database ?

Posted by Ankit Rathod on Stack Overflow See other posts from Stack Overflow or by Ankit Rathod
Published on 2011-01-16T03:45:58Z Indexed on 2011/01/16 3:53 UTC
Read the original article Hit count: 256

Filed under:
|

Hello,

I have few tables like example.

Users    Books    UsersBookPurchase
UID      BookId   UserId 
UName    Name     BookId
Password Price
Email

This is fine. I am having my own login system but i am also using some 3rd party to validate like OpenID or facebook Authetication. My question is if the user is able to log in successfully using OpenID or facebook Authentication, what steps do i need to do i.e do i have to insert one fake row in Users table because if i do not insert how will integrity be maintained. I mean what user id should i insert in UsersBookPurchase when the person who has logged in using Facebook Authentication has made a purchase because the UserId is reference key from Users table. Please give me a high level overview of what i need to do because this is fairly common scenario.

Thanks in advance :)

© Stack Overflow or respective owner

Related posts about database

Related posts about openid