Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 26th, 2006, 01:09 PM
Registered User
 
Join Date: Aug 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default UserID Membership & Referential Integrity

I am going through the demo site and taking a look at App Architecture. I am wondering how Marco references the built-in Membership tables to his custom tables? For example, in the Orders and Forums tables, it appears as if Marco is only keeping track of user activity tied by the the AddedBy field. You can easily change the name inserted there without any consequences.

Not that important unless you start talking Orders. After looking at the SP tbh_Store_GetOrdersByCustomer, it does go after the AddedBy field to query data. I know this site is only for reference, but this points an architectural question. If you want to establish better referential integrity, how do you go about that with the Aspnet_ tables provided by the framework?

Forum posting http://p2p.wrox.com/topic.asp?TOPIC_ID=46264 touches on this, but what are everyone else's thoughts on this applying this to the real world scenarios? Do you reference the Aspnet_Users.UserID column in a non-linked fashion as a pointer back or what? I would think that this would provide the best of 2 worlds - decouple yourself physically (by not linking) but still provide a strong reference point back - correct? Or what would be other options here?

If anyone is planning on using this in real deployments (got that feeling by reviewing these forum postings), I would feel uncomfortable always relying on a easily changeable Username. Or am I off base here?

 
Old August 28th, 2006, 02:35 AM
Authorized User
 
Join Date: May 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am currently using references to UserName, ie AddedBy in my tables as Marco does but I am not allowing the UserName to be changed. As Eric suggested, a user might want to change their username, eg due to getting married or something, in which case UserId would be more appropriate but might require more coding work depending on how you set up your tables.
My next website I will use UserId from the start, however.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing userid & password from URL virendrapotdar J2EE 3 November 24th, 2006 08:05 AM
Why no UserID property in the Membership class mega ASP.NET 2.0 Professional 0 August 16th, 2006 02:01 AM
foreign key constraints - referential integrity DTSDeveloper SQL Server DTS 0 September 6th, 2005 01:10 PM
xml referential integrity mescalito XML 0 December 10th, 2004 08:33 AM
Referential Integrity owain SQL Language 2 May 12th, 2004 03:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.