On Fri, Jul 23, 2010 at 8:31 PM, NewIntellectual newintellectual@gmail.com wrote:
That means that queries can be sent simply as text strings, and results of any size can also be returned in that way and then parsed as XML fragments in any number of myriad ways, including parsing to an in-memory DOM.
I understand that I can send XML in textual representation to the database and retrieve XML text. This will require constant serialization and deserialization of my XML representation, however, a cost I had been hoping to avoid. (*) In addition, it will be impossible to reuse xpath queries and update expressions.
Could the BaseX developers confirm that this is in fact the only robust way to interact with the database? I'm very surprised by this; to draw a comparison to relational databases, it's as if the only way to interact with the database is through its command line shell, and as if language bindings for SQL had never been invented. Is this, in fact, the state of the art in XML databases?
Suppose I believe that and change my application to interact with the database in purely textual form; how confident can I be that BaseX will then be able to perform operations such as inserting/removing nodes with multiple namespaces? At this point, I'm seriously considering the alternative of dropping the use of a database altogether and simple store my XML documents in a suitably designed file structure. (Perhaps combined with an external indexer to speed up full-text searches.)
- Godmar
(*) as pointed out earlier, for retrievals, I already have no choice but to serialize BaseX's DOM representation to text and then parse it into an EventTarget-capable representation, since BaseX's DOM implementation doesn't implement EventTarget. What you are saying, however, is that even parameters passed to xqueries/updates need to be serialized.