views:

99

answers:

1

I have three Tables Customers, Jobs, Orders

I Also have these tables in the a DataSet, which conforms to the same constraints as those in the Database itself.

Originally, my intention was to keep the Data in the DataSet, and create various DataView objects to display this data to the user, and also to perform any required manipulations, which will then obviously be updated back on the database using the .NET TableAdapter methodology.

However, it seems as though DataView objects are only able to operate on a sigle DataTable object.

My question is this: Which is the best way to create data in memory to ensure maintainability and performance.

  1. Create multiple DataTable objects that contain the denormalized data. This would presumably create copies of the data in memory, but I'm more concerned that there would be issues with updating the database on changes.
  2. Create some custom Class which acts the way I expected DataView to act, and is also capable of automatically updating the DataSet (and then the database).
+2  A: 

Simply databind with the original DataSet. You already have all the data and creating seperate DataTables will make it very hard to keep track of the changes to the data. Look here for some hints on databinding parent/child relations.

Gerrie Schenck