Solved

Should I and can I extend the aspnet_Users table?

Posted on 2011-03-13
7
874 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 200 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
Independent Software Vendors: 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 300 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
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.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

635 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