So BaseX is essentially useless as much more than a toy? Do you have actual evidence to support this unreliability, or is it just a hunch? When does it fail, where, and why? Have you tested it with large data sets to see if element access is a problem? Can you provide numbers?
For the sake of kicking the arguments up a notch, let's assume that I've been working with databases since the late 1980s, that I'm what you call an "expert data modeler," that, in fact, my RDBMS of preference has been PostgreSQL for the better part of a decade, that I've used nested sets and adjacency lists and recursive queries and various other methods to shoehorn trees and graphs into tabular form, and that I have extensive familiarity with other databases, as well, including object, xml, key-value, and graph databases. We could even assume that I have a degree in Informatics and have worked with advanced mathematical and set concepts up through axiomatic set theory.
With these assumptions, can anyone tell me what's wrong with BaseX -- specifically -- and why I might want to hold off on abandoning my already-built RDBMS-backed application in favor of one working strictly with XML?
I am not saying that your concerns are unfounded, NewIntellectual, but only that you have not provided any real support for them. I can go either way... does anyone have strong evidence for one side or the other?
All responses gratefully welcome.
Chas.
On 03/14/2011 12:35 PM, NewIntellectual wrote:
On Sun, Mar 13, 2011 at 5:15 PM, Charles F. Munat <charles.munat@gmail.com mailto:charles.munat@gmail.com> wrote:
I'm building a Web-based application that tracks students in various schools. Much of the data is tree-structured, and, after numerous attempts, I've given up on using an RDBMS. It's a hammer and I need a wrench.
While I'm a happy BaseX user and huge fan, I suggest not relying on the current state of the system to act as a dynamic database. Practically speaking that has to be accomplished with XQuery Update and based on testing so far I do not have the sense that it is currently reliable enough. Your database system has to Just Work, and you want it to be rock solid and completely stable (and the worst thing in that context is a bug which ends up corrupting the database, perhaps silently, not simply crashing.) I trust BaseX for data retrieval, but I need to see it mature to trust it for continuous updates, both for stability and speed (the way the system currently handles element access by indices makes me wary of performance with very large databases, which would not pose a problem for an RDBMS.)
The relational model is completely generalized and mature, so it is unlikely that it cannot handle your application. It's a matter of correct table design, with appropriate methods to read/write your data to various joined tables. I suggest getting assistance from an expert data modeler and looking into PostgreSQL or the pure java H2 system.
Also, note that there is no concept of transactions with XQuery Update, unless I am missing something. There is no analog to commit/rollback, nor ability to enforce database consistency rules (e.g. foreign key rules, which in the XML world roughly maps into schema rules, and BaseX does not check for schema validity.)
A hybrid system that partitions "database record" stuff into RDBMS tables and "structured text" stuff using BaseX is certainly possible, with entire XML documents being periodically added. It's still an issue of choosing the right tool for the right domain.