|
We use lookup tables. A simplified
version of our ERD is attached. Basically, you normalize the attributes into
a separate table and then use a one-to-many reference table to map users to
their attributes. For the attached ERD, you can pull a user’s
attributes with this query: SELECT u.user_id, a.attribute_id, a.nm, ua.value FROM (users u INNER JOIN user_attributes
ua ON
u.user_id = ua.user_id) INNER JOIN attributes a ON
ua.attribute_id = a.attribute_id WHERE u.user_id = @user_id HTH, Roland From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Jeff Chastain I am working on a portal type application where a
"user" will really only be made up of a username and a
password. That user will then have a profile which would contain other
standard details like the user's name, address, email, etc. The question
I am faced with is that for different instances of this application, the
application admin needs to be able to customize the contents of the user
profile. For example, via a web interface, admin A can set his user
profile to contain the user's first name, middle initial, last name, and email
address. Admin B however would be able to set his user profile to also
contain the user's home address, work address, and phone number. So, I can see a user profile type object here, but how do
you dynamically assign properties to that user profile without having any idea
what those properties might be at design time? Anybody modeled or seen
anything like this before? Thanks -- Jeff You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected] |
user_attributes.gif
Description: GIF image
