Data Design

  • Thread starter Thread starter Kevin
  • Start date Start date
K

Kevin

Hi,

I am wondering if I use a hashtable instead of a dataset to hold data in my
app will have less overhead and better performance? I am really looking for
a data container where I can use a key to retrieve the data (rather not use
a 2-dimensional array).

Thanks
 
If your data is just made up of key/value pairs, then yes, I would recommend
the hashtable.
 
Thanks for the post. What my app does is when the user selects an option it
goes to the db and retrieves data pertaining to that option. There are
several options the user has to select. In my Business objects, I really
need a data container of this data (perferably one column of data) so the
app can easily extract this data to do some business calculations with the
data. The reason I thought using a hashtable because it will be easy to
extract the data versus using a DataView object to extract it from a
dataset. And if I used a dataset I would have to merge datatables retrieved
from the db and then extracting the data I would have to map to correct
tables. Also, none of this data will be persisted to a database. Is my
reasoning correct to use a hashtable?

Thanks
 
Yes, I would agree. Seems your data requirements are very simple, and the
full capabilities of the dataset will only make things more difficult.

You might to wrap up all the database access, and then hashtable
population/retrieval code, so that if you ever do want to change the
implementation under the hood, you would only need to change it in a few
places and the rest of your code would still work.
 
Yes I do seperate my app into tiers UI, BO, DataAccess. It is always nice
to bounce ideas of someone.

Thanks again
 
Back
Top