[xquery-talk] Re: The State of Native XML databases
jeff.dexter at rainingdata.com
Mon Aug 20 16:59:58 PDT 2007
XML is self-describing in terms of structure, but not type, which means
runtime conversion whenever you want to do a date comparison, which is
expensive and prone to error. Using a schema at least you find the error
before you hit the query, and it affords a lot of XQuery processors
opportunity for more efficient processing (though that's a whole other
discussion regarding the capabilities of XQuery and XML databases).
Further, the assertion that using a schema prohibits evolution isn't
completely true. The rigidity of namespaces in XML Schema is a nuisance when
specs wish to use it as a guideline for newer versions, but XML schema
allows for extensibility both in terms of element and attribute content, and
an XML database can then defer to LAX validation to grow on the fly with
either recognizable or unknown content.
There's also nothing to say that "schema" support necessarily needs to be
for validation as a user could suggest one or more schemas merely as a
guideline for typing nodes much as XQuery uses them for the dual purposes of
validation and defining in-scope types.
From: John Snelson [mailto:john.snelson at oracle.com]
Sent: Monday, August 20, 2007 3:20 PM
To: Ilya Sterin
Cc: Jeff Dexter; talk at xquery.com; Dr Orlovsky MA
Subject: Re: [xquery-talk] Re: The State of Native XML databases
Ilya Sterin wrote:
>> Some type of schema can of course be useful in different scenarios,
>> but Ilya's suggestion that "ddl=xml schema" does not suit everyone.
> Yeah, if you are not looking at XML as a persistence. You wouldn't
> work with a relational store without a DDL, be it SQL or any other way
> to define your schema. Yes, there are many use cases for using xml in
> its semi-structured loose format, that's just not for persisting
> application state per say, rather message snippets, configs, etc...
> Again, you could also argue that MySQL was useful before InnoDB was
Unlike the relational data model, XML is (can be) a self descriptive format.
This is why it is easy to use an XML database without a schema, whereas it
is impossible with a relational database.
With the XML data model, you have built-in schema evolution capabilities. If
you impose a schema (XML Schema or otherwise) on your XML database, you
loose that ability - and have to re-implement it in a convoluted way if you
need it back again.
More information about the talk