473,394 Members | 1,770 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,394 software developers and data experts.

XML Files

I am trying to figure out what "rule of thumb" I should be using to figure
out if I must store/retrieve my information from a database or an xml file.
It would appear that web hosting companies will charge more for utilizing
MS SQL server and frankly I just don't feel that the cost are warranted.
There will be no database updates - is is view only info - but how big can
the XML file be before you would say you would not use an XML file for
accessing this data? I could store the information in cache and read it
from cache? Could I also just read the porition of the XML file which is
necessary to satisfy the requested page? At what threshold of traffic
would I say this is not viable?

Should I be concerned about how much memory I will be getting from my web
hosting company?

Thanks in advance for your assistance!!!!!!!!!!!!!
Nov 18 '05 #1
2 958

"Jim Heavey" <Ji*******@nospam.com> wrote in message
news:Xn********************************@207.46.248 .16...
I am trying to figure out what "rule of thumb" I should be using to figure
out if I must store/retrieve my information from a database or an xml file. It would appear that web hosting companies will charge more for utilizing
MS SQL server and frankly I just don't feel that the cost are warranted.
There will be no database updates - is is view only info - but how big can
the XML file be before you would say you would not use an XML file for
accessing this data? I could store the information in cache and read it
from cache? Could I also just read the porition of the XML file which is
necessary to satisfy the requested page? At what threshold of traffic
would I say this is not viable?

Should I be concerned about how much memory I will be getting from my web
hosting company?

Thanks in advance for your assistance!!!!!!!!!!!!!


As far as I know, you can't read a portion of an xml file. You would need to
read everything
up to the portion you want to identify that portion.

What you could try to do is:
- read in the entire file as an XmlDocument
- store it in the Cache (possibly with a dependency on the file)
- use a singleton-like scheme so it will be read once (if it is not in the
cache)
- this way there should be only a single copy of the document in memory
that is shared between all requests.
- you can then use xpath (SelectNodes, SelectSingleNode) to retrieve
the data you want.

For a read/write scenario I would not recommend this, but for a read-only
scenario it could work.
Hans Kesting
Nov 18 '05 #2
I have been going back and forth with the same issue. So
far, I have had some great luck using the dataset.ReadXml
method, loading the XML file at the start of the
application, then storing just one data table in the
application's cache object (Cache("product_table") =
DataSet1.Tables(0))

Granted, this is a simple application thus far, but
response times have been great. I am playing it by ear
that this will expand as much as I need it to (I've read
some harsh criticism of using saving a full DataSet to an
Application or Session object).
-----Original Message-----
I am trying to figure out what "rule of thumb" I should be using to figureout if I must store/retrieve my information from a database or an xml file.It would appear that web hosting companies will charge more for utilizingMS SQL server and frankly I just don't feel that the cost are warranted.There will be no database updates - is is view only info - but how big canthe XML file be before you would say you would not use an XML file foraccessing this data? I could store the information in cache and read itfrom cache? Could I also just read the porition of the XML file which isnecessary to satisfy the requested page? At what threshold of trafficwould I say this is not viable?

Should I be concerned about how much memory I will be getting from my webhosting company?

Thanks in advance for your assistance!!!!!!!!!!!!!
.

Nov 18 '05 #3

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

Similar topics

2
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
44
by: Xah Lee | last post by:
here's a large exercise that uses what we built before. suppose you have tens of thousands of files in various directories. Some of these files are identical, but you don't know which ones are...
0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
18
by: JKop | last post by:
Here's what I know so far: You have a C++ project. You have source files in it. When you go to compile it, first thing the preprocessor sticks the header files into each source file. So now...
3
by: pooja | last post by:
Suppose i have created a class c1 with f1()in c1.cpp and included this c1.cpp in file1.cpp file , which is also having main() by giving the statement #include "c1.cpp". the same i can do by...
11
by: ambika | last post by:
Iam just trying to know "c". And I have a small doubt about these header files. The header files just contain the declaration part...Where is the definition for these declarations written??And how...
22
by: Daniel Billingsley | last post by:
Ok, I wanted to ask this separate from nospam's ridiculous thread in hopes it could get some honest attention. VB6 had a some simple and fast mechanisms for retrieving values from basic text...
18
by: UJ | last post by:
Folks, We provide custom content for our customers. Currently we put the files on our server and people have a program we provide that will download the files. These files are usually SWF, HTML or...
0
by: wal | last post by:
How does one attach files to emails using libgmail? The following code http://pramode.net/articles/lfy/fuse/4.txt works fine when said files are simple text files, but it failes as soon as the...
3
by: aRTx | last post by:
I have try a couple of time but does not work for me My files everytime are sortet by NAME. I want to Sort my files by Date-desc. Can anyone help me to do it? The Script <? /* ORIGJINALI
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...
0
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...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.