473,382 Members | 1,238 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Cached vs Local Database - advice please

Hi

I am currently weighing up two options.

I have a data i need available for my website.
However, this data is only available via a web service and too slow to
retrieve on a user request basis.

So i plan once a day load to download this data. Either into the Cache, or a
local database i'll set up.
I would like to know what the better method would be,

We're talking about 1000 records, 20 fields (none to large). So really, not
a large amount of data.

Now i think Cache would be quicker. But this data needs to be searched and
filtered.
So would it be wiser to have the database setup as this may be quicker to
filter
Or is it just as efficient to loop through say a DataTable in memory?

What's the best method here?

Also, if the Cache is the way to go, whats the best way to store it -
dataset, datatable, hash table, arraylist etc.
And are there better ways of searching these than looping through them?

TIA - this would be a great help
Nov 19 '05 #1
2 1785
Good questions, Grant.

Using a database will give you more lexibility with regards to organizing,
filtering, and querying the data. However, DataSets and DataTables have the
capability to filter and sort data without looping. And a database consumes
more resources to use, as well as being slower. So, whether to use a
database or an in-memory data source is pretty much dependent upon what you
want to do with the data.

Now, as to where to cache in-Memory data, you have basically 2 choices
(simplifying the explanation): Application Cache or Session. Application
Cache is shared across all Sessions and Pages. Session Cache is shared
across all pages for a single client Session. So, if the data is not
user-specific, Application Cache is the way to go with regards to an
in-memory cache, as there is only one copy of the data consuming memory for
the lifetime of the App.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"Grant Merwitz" <gr***@workshare.com> wrote in message
news:eP**************@TK2MSFTNGP14.phx.gbl...
Hi

I am currently weighing up two options.

I have a data i need available for my website.
However, this data is only available via a web service and too slow to
retrieve on a user request basis.

So i plan once a day load to download this data. Either into the Cache, or
a local database i'll set up.
I would like to know what the better method would be,

We're talking about 1000 records, 20 fields (none to large). So really,
not a large amount of data.

Now i think Cache would be quicker. But this data needs to be searched and
filtered.
So would it be wiser to have the database setup as this may be quicker to
filter
Or is it just as efficient to loop through say a DataTable in memory?

What's the best method here?

Also, if the Cache is the way to go, whats the best way to store it -
dataset, datatable, hash table, arraylist etc.
And are there better ways of searching these than looping through them?

TIA - this would be a great help

Nov 19 '05 #2
Thanks for your advice.

I think the database is the way to go.
Considering the request to build this project came from marketing and
therefore is like to be ever changing - as they can never make up there
minds.

I think fexibility if definately the better option here.

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:u0**************@TK2MSFTNGP10.phx.gbl...
Good questions, Grant.

Using a database will give you more lexibility with regards to organizing,
filtering, and querying the data. However, DataSets and DataTables have
the capability to filter and sort data without looping. And a database
consumes more resources to use, as well as being slower. So, whether to
use a database or an in-memory data source is pretty much dependent upon
what you want to do with the data.

Now, as to where to cache in-Memory data, you have basically 2 choices
(simplifying the explanation): Application Cache or Session. Application
Cache is shared across all Sessions and Pages. Session Cache is shared
across all pages for a single client Session. So, if the data is not
user-specific, Application Cache is the way to go with regards to an
in-memory cache, as there is only one copy of the data consuming memory
for the lifetime of the App.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
Ambiguity has a certain quality to it.

"Grant Merwitz" <gr***@workshare.com> wrote in message
news:eP**************@TK2MSFTNGP14.phx.gbl...
Hi

I am currently weighing up two options.

I have a data i need available for my website.
However, this data is only available via a web service and too slow to
retrieve on a user request basis.

So i plan once a day load to download this data. Either into the Cache,
or a local database i'll set up.
I would like to know what the better method would be,

We're talking about 1000 records, 20 fields (none to large). So really,
not a large amount of data.

Now i think Cache would be quicker. But this data needs to be searched
and filtered.
So would it be wiser to have the database setup as this may be quicker to
filter
Or is it just as efficient to loop through say a DataTable in memory?

What's the best method here?

Also, if the Cache is the way to go, whats the best way to store it -
dataset, datatable, hash table, arraylist etc.
And are there better ways of searching these than looping through them?

TIA - this would be a great help


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Charley | last post by:
OK, this is going to sound dumb to most but here goes. Please keep in mind, I am coming from a windows background. I want to do some development using PhP and animated gifs. I see that the...
4
by: John Morgan | last post by:
I have Enterprise Manager on my local machine. For the last twelve months it has been connecting without problem to my online SQL Server database provided by my ISP. Three weeks ago the ISP...
16
by: JonnyD | last post by:
I am working on a project to build a reporting web app from an exsiting database that is controled by a local application. The application that has control over the database creates a lock file to...
0
by: prakashsha | last post by:
Hi, I've written a client (winform) calling webservice. The client creates a webservice proxy object set the credentials cache and calls the webmethod. Currently i've deployed the winform client...
0
by: jason | last post by:
I googled a lot, couldn't find a good solution. Any help is greatly appreciated. What I want to do is: Given a web page in a running IE browser , i want to save an image in this web page to...
3
by: John Morgan | last post by:
I have my first small SQl Server 2005 database developed on my local server and I have also its equivalent as an online database. I wish to update the local database (using and asp.net interface)...
55
by: Zytan | last post by:
I see that static is more restricted in C# than in C++. It appears usable only on classes and methods, and data members, but cannot be created within a method itself. Surely this is possible in...
1
by: DG1 | last post by:
Hi :) We only have access to local news server when our international bandwidth is finished. When we view articles or parts from the local server which is cached, we get high speeds, if the...
0
by: BVM | last post by:
Hi, I have a problem and hope you can give some advice. I have a windows Form which uses web service to communicate with our web site and database. It's working fine in most of our offices....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.