DataTable vs DataSet ( and Caching )

J

John

Hey, all -

Context:
I'm working on a project where I'm storing a relatively small amount of
'featured' product information in cache - about 30 records, not updated very
frequently. They get selected from randomly 3 or 4 at a time and are
displayed on pretty much every page of the site, in a DataList (and using
keys). At the moment, I'm storing this information in a DataTable and
putting it in cache. There isn't any sort of relation needed to be set up
between this DataTable or any other I may keep in memory, so I figured I
could do without the DataSet.

So my questions are:

Am I saving any overhead by working with an individual DataTable as opposed
to a DataSet with one DataTable in it?

Does it make it easier for the cache to manage multiple individual
DataTables instead of one DataSet containing those DataTables - in that, it
can drop a DataTable if resources get low, instead of dropping an entire
DataSet?

Am I better off storing this info in another way? An ArrayList? I haven't
messed around much with any of the Collection objects - newb here. I suppose
my preference would be to be able to still reference 'column names' in my
DataBinding expressions in the ItemTemplate, and to set the DataKeys to my
featured products' productID.

Anyway, I'm probably misunderstanding some pretty large basic concepts here,
so feel free to point out the obvious. Thanks in advance!

-John
 
Joined
Jun 8, 2007
Messages
1
Reaction score
0
When you work with data table, in backgroud you allready have created a dataset object. So regarding your first question it is same think.
Second question, Does it make it easier for the cache to manage multiple individual DataTables instead of one DataSet containing those DataTables, answer is same (performance issues), dataset allows you to do better organisation of your tables structures.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top