Page 1 of 1

BaseX (XML databases)

Posted: Mon Feb 07, 2011 4:43 am
by HannesB
Hi all,

As we know, MySQL is quite limited when it comes to natively process XML data ans use XPath and XQuery. The XML database BaseX (http://basex.org) seems to offer comfortable APIs to query XML documents via XPath/XQuery, including Full Text requests…

http://docs.basex.org/wiki/Standard_Mode
http://docs.basex.org/wiki/Query_Mode

Have some of you tried this combination before?

Cheers,
Hannes

Re: BaseX (XML databases)

Posted: Mon Feb 07, 2011 11:38 am
by greyhoundcode
I haven't used BaseX before, but I have played with the Express version of DB2 with a view to storing and working with quantities of XML data besides relational data (discussion relating to that in this thread should you be interested).

At the moment I'm working on a project that uses SQL Server 2008 - which offers reasonably good capabilities for working with XML - although in our particular case we pretty much replaced XML fields within the database with alternative structures making use of the hierarchyid data type, only converting those hierarchies to XML when that format is absolutely required.

Re: BaseX (XML databases)

Posted: Mon Feb 07, 2011 1:48 pm
by HannesB
Thanks for your answer and the details on your solution!

What I like about BaseX is the possibility of importing really large XML documents, and to query them via XQuery Full Text – a features that does not seem to be natively supported by many other XML-enabled or native databases. And it seems to be way faster than the competition (eXist, Qizx, Sedna, etc).

Your linked thread looks interesting, I'll have another look at it.

Re: BaseX (XML databases)

Posted: Mon Feb 07, 2011 4:49 pm
by Weirdan
HannesB, it would be interesting to hear about projects you've used that database for (as you mentioned in the other thread that you actually used it to much success) and how xml database was a better fit for it.

Re: BaseX (XML databases)

Posted: Mon Feb 07, 2011 5:41 pm
by HannesB
Dear Weirdan,

I've mainly used BaseX to make existing large XML instances browsable and queryable, e.g. the DBLP [1], or some commercial MedLine data [2]. Some years ago, I had a first look at XML databases; at that time, only systems like eXist and Tamino were available, which were painfully slow and bulky compared to today's alternatives. I feel that things have changed today, but it seems that many people have already found their preferred technologies.

After all, I'm mainly versatile in XML, and (unfortunately) not too much into PHP, so I was mainly wondering how large XML data is processed in the PHP community.

[1] http://dblp.uni-trier.de/xml/
[2] http://www.nlm.nih.gov/bsd/licensee/dat ... s_doc.html

Re: BaseX (XML databases)

Posted: Mon Feb 07, 2011 8:22 pm
by VladSun
HannesB wrote:I was mainly wondering how large XML data is processed in the PHP community.
Just the "ordinary" way:

http://www.php.net/manual/en/refs.xml.php

There is an XSLT processor for PHP. I prefer applying (if needed) an XSL prior using XPath whenever possible.