Forum Moderators: open

Message Too Old, No Replies

XML Database vs. MySQL Databases

         

ryan_b83

6:13 pm on Oct 30, 2007 (gmt 0)

10+ Year Member



Hello, I am an experienced developer in the LAMP enviornment, I have heard recently about XML databases.

What are the advantages/disadvantages to using an XML database over a MySQL database? And can an XML database totally replace MySQL?

Thanks,
Ryan

cmarshall

6:55 pm on Oct 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I like XML, but I prefer using MySQL for the DB.

However, I don't have a lot of experience using pure XML databases (I have stored XML data in MySQL, but I don't think that's the same thing).

I always say that XML is a data transfer technology, not a data storage technology, but not everyone agrees.

One of the biggest hurdles that you will encounter with many XML technologies is getting an ISP to support them. I use XSLT a lot, and it has been a huge pain to get ISPs that properly support it.

httpwebwitch

8:40 pm on Oct 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have (almost) no experience with them, but I'll comment anyways

Using an XML database is reportedly more efficient in terms of conversion costs when you're constantly sending XML into and retrieving XML out of a database. The rationale is, when XML is the only transport syntax used to get things in and out of the DB, why squeeze everything through a layer of SQL abstraction and all those relational tables, foreign keys, and the like? It basically takes a parsing layer out of the application and brings it into the data engine - where it's probably going to work faster and more efficiently than the SQL alternative. Probably.

I suspect some of these databases like XIndice, eXist, OZONE etc are perfectly wonderful products. But they haven't been around so long and don't elicit the kind of trust (from a jaded old dev like me) as a more legacy product like Oracle, MSSQL, or even MySQL.

I've worked with a system where the output of a SQL stored procedure was rendered natively in XML (using a MSSQL db), and I must admit it was quite elegant. Combined with the power of XSLT, the output of a database query can be transformed into anything you may imagine in only a few lines of procedural code (not including the XSLT itself)

I do not think an XML database can replace MySQL. MySQL is excellent at the things SQL does well - relational tables, joins, queries, sorting, indexing, creating paginated tabular rows. an XML database strikes me as a product you'd only use if your needs were a perfect fit, and XML is the only transport method you'll ever be using.

What can I say... try one of the free ones and see how it goes.

and please do report back with your opinions + experiences, I'd like to hear about it