By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,916 Members | 1,336 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,916 IT Pros & Developers. It's quick & easy.

Data Design

P: n/a
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
Nov 15 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
If your data is just made up of key/value pairs, then yes, I would recommend
the hashtable.

"Kevin" <ke*@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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

Nov 15 '05 #2

P: n/a
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

"Marina" <so*****@nospam.com> wrote in message
news:u7*************@tk2msftngp13.phx.gbl...
If your data is just made up of key/value pairs, then yes, I would recommend the hashtable.

"Kevin" <ke*@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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


Nov 15 '05 #3

P: n/a
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.

"Kevin" <ke*@yahoo.com> wrote in message
news:uo**************@TK2MSFTNGP09.phx.gbl...
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

"Marina" <so*****@nospam.com> wrote in message
news:u7*************@tk2msftngp13.phx.gbl...
If your data is just made up of key/value pairs, then yes, I would

recommend
the hashtable.

"Kevin" <ke*@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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



Nov 15 '05 #4

P: n/a
Yes I do seperate my app into tiers UI, BO, DataAccess. It is always nice
to bounce ideas of someone.

Thanks again

"Marina" <so*****@nospam.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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.

"Kevin" <ke*@yahoo.com> wrote in message
news:uo**************@TK2MSFTNGP09.phx.gbl...
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

"Marina" <so*****@nospam.com> wrote in message
news:u7*************@tk2msftngp13.phx.gbl...
If your data is just made up of key/value pairs, then yes, I would

recommend
the hashtable.

"Kevin" <ke*@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
> 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
>
>



Nov 15 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.