Custom Data / After LLBLGeneration

Posts   
 
    
ScottCate
User
Posts: 48
Joined: 11-May-2005
# Posted on: 20-Dec-2005 01:56:10   

I'm wondering if others will share ideas on how they handle custom data. This is data that is added to the schema at runtime, by the applicaiton.

Example. Say I'm writing a shopping cart, and it naturally has a dbo.Products table. I deploy my application, and I want to hav ethe option of "Custom Data" on the products table. So maybe an end user, can add a field called "Product Color".

I know of several ways to accomplish this.

Option #1. Add an dbo.Products.ExtraData column, and store XML. This is pretty flexible, and with the SQL2005 XML support, not a bad option. Crappy option for other databases without robust XML support at the column level. With a good custom field schema this sounds promising, with nice LLBLGen support.

Option #2. Create a set of Custom Data Tables, ie: dbo.CustomDataColumn, dbo.CustomData etc, to store the extra data. This has nice LLBLGen support as well, that is a little more dynamic across databases.

Ideas? Discussion? Pointers?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 20-Dec-2005 07:07:04   

I'd go for the first option simple_smile keeps the design more intact IMHO

jeffreygg
User
Posts: 805
Joined: 26-Oct-2003
# Posted on: 20-Dec-2005 21:42:36   

I'd say the second option as it allows you to use LLBLGen Pro's predicate system for queries.

Jeff...

JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 20-Dec-2005 23:14:48   

Also there are custom code sections in the generated entity classes. You can add code here and it won't get overwritten.

pilotboba
User
Posts: 434
Joined: 05-Aug-2005
# Posted on: 21-Dec-2005 00:12:48   

JimFoye wrote:

Also there are custom code sections in the generated entity classes. You can add code here and it won't get overwritten.

I'm not sure how this would apply to storing custom data for the user. Could you elaborate?

BOb

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 21-Dec-2005 09:23:01   

I'd say the second option as it allows you to use LLBLGen Pro's predicate system for queries.

The first option is possible with the current predicate system(check the following thread), and the future predicate system (most probably XQurey support will be available)

http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=4577