For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > June 2004 > Storing XML









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Storing XML
Tom

2004-06-28, 4:07 pm

Hi,

I'm designing a website that will use XML to store all the content of my
web pages. I will use a PHP script to parse the XML. Should I store the
XML in a MySQL database or should I simply store the XML in *.xml files
on my server? Which would would yield better performance? And would
using one PHP script to parse all the pages be too much on one script
(I'll have about 600 pages)?

Thanks,

Tom
Chung Leong

2004-06-28, 8:57 pm

"Tom" <nospam@earthlink.net> wrote in message
news:oCZDc.17509$bs4.9265@newsread3.news.atl.earthlink.net...
> Hi,
>
> I'm designing a website that will use XML to store all the content of my
> web pages. I will use a PHP script to parse the XML. Should I store the
> XML in a MySQL database or should I simply store the XML in *.xml files
> on my server? Which would would yield better performance? And would
> using one PHP script to parse all the pages be too much on one script
> (I'll have about 600 pages)?


Loading a text is quicker in general than retrieving data from a database.
From a practical point of view though 10 millisec vs. 30 millsec is
insignificant, when it probably takes a full second for the client to
download the page.


steve

2004-06-29, 3:56 am

> "Tom" <nospam@earthlink.net> wrote in message
> news:oCZDc.17509$bs4.9265@newsread3.news.atl.earthlink.net...
content of my[color=darkred]
store the[color=darkred]
files[color=darkred]
would[color=darkred]
script[color=darkred]
>
> Loading a text is quicker in general than retrieving data from a

database.
> From a practical point of view though 10 millisec vs. 30 millsec is
> insignificant, when it probably takes a full second for the client

to
> download the page.

I agree with Chung that timing is not the determining factor here.
mysql also caches repeated queries, so the result set is coming back
from memory and not from the disk.

Also, you will find out soon that you want to manipulate the content
is some way, or share some of it among a number of applications, or
clean it up in some way. Then you find out that you need mysql.... so
start with mysql to have a "flexible" system IMHO.

--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/PHP-Storing...pict124023.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=413681
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com