SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to handle dynamic fields


How to handle dynamic fields

Author
Message
chrisn-585491
chrisn-585491
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2043 Visits: 2441
I'm not sure if I'm using the right terms, but I was wondering the proper way to design a database/application where the application needs to create additional attribute fields in a table based on user needs? Not all possible fields are determined at sale time, but the customer may need additional fields based on needs. How can this be accomplished without resorting to EAV design issues, etc...
PaulB-TheOneAndOnly
PaulB-TheOneAndOnly
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5669 Visits: 4639
chrisn-585491 (7/18/2013)
I'm not sure if I'm using the right terms, but I was wondering the proper way to design a database/application where the application needs to create additional attribute fields in a table based on user needs? Not all possible fields are determined at sale time, but the customer may need additional fields based on needs. How can this be accomplished without resorting to EAV design issues, etc...


Let me check my understanding of this... is this an application your company is selling to third party customers and you want for the customer to have the ability to add "fields" to it?

Shall I also assume the "customer" has no access to the actual code?

If my two assumptions are correct, you can rely on some solution like Oracle Apps does, the famous "flex fields". each table has a set of "flex fields" columns that can be customized thru a catalog table where you define the name and attributes of a particular "flex field" like...

table=table-accounts
flex field=flex-field02
name="mobile phone"
mask=numeric(10)
editable=Y
reportable=Y

Needless to say, the application code has to be smart enough to interpret such definitions, include those "flex fields" on forms, reports, etc.

_____________________________________
Pablo (Paul) Berzukov

Author of Understanding Database Administration available at Amazon and other bookstores.

Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
ivan.drvaric
ivan.drvaric
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 1
Having similar problem: http://www.sqlservercentral.com/Forums/Topic1480416-373-1.aspx.

Any experience and steps that you succeeded to resolve or model grateful for your sharing experience type of approach.
cbarus
cbarus
SSC-Enthusiastic
SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)

Group: General Forum Members
Points: 145 Visits: 160
One way to accomplish this would be soft coding. The key to either go this direction or not is the volume of the data. Let me know the typical size of each of the tables and I could elaborate further.



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search