August 22nd, 2002, 11:53 AM
XML vs. MySQL for data extraction
I'm going to be starting on a larger-sized project pulling data from several MySQL databases. And I'm just getting up to speed on XML and XSL. Is there really that significant a performance increase in pulling data from an XML file (using XSL and Sablotron) versus a direct connection to a database (using PHP)?
I do want to make some of the data available to several other sites, and accessibilty for multiple devices will be an issue - so I'm leaning in the direction of XML. Nonetheless, I want to make sure it wouldn't be overkill - and create a possible performance issue...
August 29th, 2002, 04:52 AM
The speed issue it going to be largely determined by how you use the data. If you find yourself with an 8MB XML file that you only need 3 nodes from, I'm betting MySQL would give you faster access to that data.
XML isn't really interchangeable with an RDBMS, but there are situations where it is as good or better. It all depends on your requirements, though.
August 29th, 2002, 11:00 AM
thanks so much for replying. I've been struggling a bit with how the whole XML thing fits (or could fit) into my future projects. And since we do quite a bit of database development, I wasn't sure if I should just stick with what we've got...
September 1st, 2002, 04:17 AM
The power of XML is not in hand coding the XML documents and selecting node values with XSL.
A XML "file" is usually created from a database, cached and then available for smaller queries. You never would want to have a XML file that is too large because it will be a resource hog.
XML is Extensible but not all that fast yet.... Good luck.
September 9th, 2002, 10:43 AM
Thanks Paulblo - I was thinking that might be the way to go (db to XML file). Then whenever anyone made changes to the databases, new xml files would be created to replace to previous ones...
Sorry for the delay on this - on vacation last week.