Last post Apr 26, 2011 09:28 AM by Rajneesh Verma
Apr 24, 2011 06:39 PM|SamU|LINK
In my app, I have a People table that stores personal data. The app is also using the built-in Membership for managing users, roles etc.
The dilemma I have is this: all contact info go into People table where I also keep their email data. However, some people who are "contacts" end up becoming users for the app as well. When they do, during registration, they enter their email address which
is stored in aspnet_Membership table. Immediatelly after registering as a user for the app, I ask them to fill out their profiles. So, this creates a situation where:
As you can see, this is a violation of normatlization rules and as a result, things get a little hairy in this situation. I'd like to know how others have handled this situation.
Apr 25, 2011 02:55 AM|Rajneesh Verma|LINK
I think no need tp store email in two places as your userid unique and referenced as foreign key in people table you can get email id from membership table easily using join.
Hope helps you.
Apr 25, 2011 01:33 PM|SamU|LINK
The problem is that the built-in membership stores user's email in the aspnet_Memberhsip table which I can't mess around with.
Maybe I need to further clarify the scenario:
Every user WILL have his/her personal profile in the People table. However, NOT every person will have a UserId.
For example, I enter all my clients' information in the People table as well. Not all clients will access the application -- therefore they won't have UserIDs.
The problem arises when a person has access to the application. That's when I need full personal information from them. That's when they need to give me their emails. But I also want to collect a secondary email information so what's in the aspnet_Membership
table is not enough.
I hope this clarifies why I need to have email information in two places.
Here's a scenario:
Now, I have John's email address in two places i.e. People table as well as aspnet_Membership table. If John changes his email in the future, it's quite likely that one of the email addresses will NOT get updated.
Apr 26, 2011 09:28 AM|Rajneesh Verma|LINK
Nice Explanation...Like it..If you are sure that each people in spnet_Membership should exist in People table if its possible then you can use Primary foreign relation with Cascading Update and Delete.
else you need to check manually.