Jeff and .NET

The .NET musings of Jeff Putz

Sponsors

News

My Sites

What do you do for miscellaneous data buckets?

What do you do when an application has to store extra data that varies? For example, some customer data requires number of cats, others require number of felonies. This is not data I need to search, and I can obviously sort it pretty easily in business objects.

How do you store it? I thought that the ASP.NET v2 scheme for profile data was kind of clever. I also suppose you could dump some simple XML into a text field in the database.

What would you do?
Posted: Apr 06 2005, 03:40 PM by Jeff | with 3 comment(s)
Filed under:

Comments

Darren Neimke said:

Hi Jeff... I use the same technique. Effectively a table of name/value pairs which I call "Attributes". That way you can just select all of the Attributes for a given entity easily and it keeps your schema simple and clean.
# April 6, 2005 6:08 PM

Richard Tallent said:

1. Easy answer: ye olde HashTable.

2. Move it to another object that provides and caches the information as-needed rather than mussing about with the core object.

3. Dropping XML into a database field--ugh! Why not design the database correctly in the first place? A simple FKUserID/name/value table would do nicely and give you searchability when you eventually need it.
# April 11, 2005 1:55 AM

Jeff said:

The object representation is not something I was even remotely interested in getting your opinion on. I was speaking strictly of persisting the data.
# April 11, 2005 1:46 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)