On Sun, Mar 13, 2011 at 5:15 PM, Charles F. Munat
<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.