473,795 Members | 2,425 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1805
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***@workshar e.com> wrote in message
news:eP******** ******@TK2MSFTN GP14.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***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:u0******** ******@TK2MSFTN GP10.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***@workshar e.com> wrote in message
news:eP******** ******@TK2MSFTN GP14.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
2734
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 patch can be applied to PhP 4.3.2 and 4.3.3 to enable imagegif and animate functions. I have come to the realization that I am going to have to run my own local linux server. My question then is what do I need to install a local server to host web...
4
5496
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 applied some sort of extra security arrangements to their SQL Server to allow access only through port 1433. they have told me to configure an alias using Network Client and to register this alias in the usual way using my Enterprise Manager. My...
16
1993
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 the database and at that point I can no longer access the database with my web app. Is there anyway around this? All I need is read only access to the database to get some report information to display on the web page. The error I get on the...
0
970
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 on 3 machines, On the webservice side i retrieve the logon name by calling User.Identity.Name. The program works perfectly in 2 machines (ie., I am able to retrieve the exact logged in userid and password) However on the third machine it always...
0
1843
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 my local folder programatically in C#/VB.net. But i couldn't save the image from its src attribute of IMG tag, because that src is generated using ajax, the image is gone from server after it is sent back to client. So the only way to save the...
3
4638
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) and then to upload the data (at least the amended data, but given the small size all data should be no trouble) to the online database. I think replication is the straight answer but I have no experience of this and I am wondering what else...
55
6249
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 C# in some way? Or maybe no, because it is similar to a global variable (with its scope restricted) which C# is dead against? Zytan
1
2128
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 articles or parts are not cached, the speeds are extremely slow. Is there a script or program we could use to check what is cached in the local server ? We are desperate because we are getting robbed here because of a telecommunications monopoly....
0
859
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. However one of our offices use VPN(virtual private network) to do their work. They often(not always) get error when they use the form. I look at into it and found that no matter how they change the date range, the query results are always the same. If...
0
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10214
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3723
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.