I've got a similar setup in my system.

This may not be the BEST way to do it, but it works fine for me.

For any given entity, I have a main data table, that always has the same 
fields.

I also create a "custom data" table associated with that main entity 
table. The table names are similar, i.e. like "entity_123" and 
"entity_123_customdata". I've got the main data table's PK set up in the 
custom data table as a FK.

I also have a global "custom field" table, where these custom fields are 
defined - type, defaults, etc etc. That table's PK is also set up in 
each custom data table as an FK.

Also in the custom data tables, I have three main data columns - one's a 
varchar, one's a text, one's a datetime. Depending on the custom field 
type, I use one of these three fields whenever inserting data tied to 
that custom field's ID.

When retrieving data, I'll snag the custom field data from the custom 
field table, that's tied to that entity's ID (i.e. like "entity_123" 
above - 123 is the ID in question), and then pull the data from both the 
main data table and custom data table, and display as needed.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:281988
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to