Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Should I and can I extend the aspnet_Users table?

Posted on 2011-03-13
7
Medium Priority
?
885 Views
Last Modified: 2012-06-21
Hi, I'm using asp.net 3.5 and C#
After a user logs in, I need to know if this user has completed an initial form if not then send the user to that form.  I only need a column with bookean value indicating this.  Should I put this in a separte database table or can I extend this table/
Also, I have a couple other tables that records data collected from these forms for each users.  I need to link the logged in user to these tables using something like userid.  Should I create these tables using the aspnet_Users userid?    If not, should I just use the logged in user's email address as key?  Thanks.
0
Comment
Question by:lapucca
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 2

Expert Comment

by:sihar86
ID: 35124835
Sorry, I don't understand the last sentence.
What is the relation of user's email address with other table?
Could you explain the structure of the table?
0
 

Author Comment

by:lapucca
ID: 35124897
I'm trying to find a way to store information for each of the logged in user,  So let's say I have a table named form1.  I want to look up form1 entry that's related to the logged in user.  What do you recommend for me to use to link the logged in user to the table.  I mean which column in aspnet_Users table should I use as a Froeign Key in the form1 table.  Thanks.
0
 
LVL 11

Assisted Solution

by:SAMIR BHOGAYTA
SAMIR BHOGAYTA earned 800 total points
ID: 35125468
Hi, try this example

For example: Creating the user:

Code below shows the creation for user in aspnet user table and get the aspnetuserId and pass it as input parameter on your insert stored procedure to link the added user to your table in your database.

// insert the user in aspnet users.

MembershipUser usr = Membership.CreateUser(Username, Username, Email);

string aspnetUserId = "{" + usr.ProviderUserKey.ToString() + "}";

Guid gdAspnetUserId = new Guid(aspnetUserId);

// insert in your users table

UsersTableAdapter UserTA = new UsersTableAdapter();

UserTA.SP_Users_Insert(gdAspnetUserId, Username, Email, Address); //Your Paramaters

more on this link

http://www.c-sharpcorner.com/uploadfile/dsdaf/aspnetuserprofileextend09292006172529pm/aspnetuserprofileextend.aspx
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Accepted Solution

by:
Kelmen earned 1200 total points
ID: 35125587
if you use the table, you better prepare some unit-test code to test your changes, in case whenever some service-pack update recreate the table.
you need maintainance/checking plans/procedures for any changes/patches by m$.

if you create your own table, separate database, it will be more fault-tolerance, but performance will be sacrifice. if your user data is not huge, this is recommended. do yourself a performance test to justify it. you may need to implement replication since the data is in separate db.
0
 

Author Comment

by:lapucca
ID: 35125627
For that one column one bit data I want to add that to the aspnet_Users table.  How would I retrieve that?  Using regular ado.net?  Can I query aspnet_Users table?
I have more data collected from several forms that the user completed.  Those data are definintely going into a separate database.  I'm trying to find out how do i link the logged in user to this database's tables.  What key/info should I use to do this?  Thanks
0
 
LVL 5

Expert Comment

by:Kelmen
ID: 35146548
i assume this "aspnet_Users" table/db, is a sample by m$.

i dunno how the existing packaged asp sample/code doing their stuffs.

if they retrieve directly from the table, you must modify your sql to include your new column
if through stored-proc, then a bit more work, i sure you know what to do.

for your separate db, as long as you have the column to store the user unique id, you don't really need linkage/reference to the aspnet_Users, as it will be bad for performance.
you need to concern if a user is deleted from the table, how you gonna maintain that on your separate db:
- either you don't bother, but provide a script/maintenance/schedule-plan which you will remove deleted user in your separate db when cross checking the aspnet_Users, cross db query is not hard.
- you can lookinto using replication, assuming your separate db don't provide user maintenance feature through ui, the user maint is straightly done in the aspnet_Users database.
0
 

Author Closing Comment

by:lapucca
ID: 35152292
Thank you.
0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question