BaseX (XML databases)

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
HannesB
Forum Newbie
Posts: 5
Joined: Mon Feb 07, 2011 4:31 am

BaseX (XML databases)

Post 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
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: BaseX (XML databases)

Post 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.
HannesB
Forum Newbie
Posts: 5
Joined: Mon Feb 07, 2011 4:31 am

Re: BaseX (XML databases)

Post 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.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: BaseX (XML databases)

Post 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.
HannesB
Forum Newbie
Posts: 5
Joined: Mon Feb 07, 2011 4:31 am

Re: BaseX (XML databases)

Post 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
Last edited by HannesB on Tue May 14, 2013 8:54 am, edited 1 time in total.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: BaseX (XML databases)

Post 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.
There are 10 types of people in this world, those who understand binary and those who don't
Post Reply