I have a dilema... I am putting a business object together which stores data
into a SQL database. The problem is, which technique to use??

In VB6 we didn't have many options, so it was easy, well kind of. Now, we
have a number of wiz bang ways, but which is best? Let me try to expalain
the problem, and maybe you can provide some light on the best solution.

Hierarchial object model, some objects have a small amount of data, others
have a large number ie 2,000+ in a collection. I'd like to keep it as natural
as possible, that is the nice x("key").Name type syntax.

The way I see it I have the following options. I should point out that I
haven't got a full understanding of all the options as yet, but have a basic
understanding of what they 'should' do for me.

Option 1: Method Calls
Read Access:
Reduce the object to a simple structure and have each method call access
the database and return a result set. Probably a DataSet in .NET
Write Access:
Where we try update the database with something like x.update(value1,value2)
or some XML maybe as a parameter. The idea being send a chunk of data to
the middle tier and process it without creating the object model.

Option 2: Object Model
Read Access:
On creation of the object load all the data into the object model. Then
access data as normal via the object tree.

Write Access:
Again read all the data into the model. Then change the bits required, and
then call an update method.

Option 3: DataSet
Read Access:
Map a .NET typed DataSet to the object model. Using relationships in the
Dataset to map to the tables.

Write Access:
As above, but change the values like Option 2. Then call the accept changes
method of the dataset.

Option X: Your suggestion!

The key thing I want to achieve is it to be 'fast' and scalable yet have
a nice object model feel to it. I see Option 1 as being a little ugly in
presentation but probably fast. Option 2 looks good, but would probably
be slow. Option 3? well I think this is the area to look at but its all
ab it new, and I'm not quite sure what the performance would be. I'm also
not that sure how you'd wire the typed dataset created by VS.NET to your
business object.

Another issue is that it should be easily used by the calling application.
That is it would be nice to be able to bind the object to ASP.NET controls

If you think I've missed the mark on my Options that's cool, as I and I'm
sure many others would appreciate other views on how to tackle the Database
Vs Object model problem.

I look forward to anyones comments. Just make them pleasant

Garry Mc