[xquery-talk] Re: The State of Native XML databases
john.snelson at oracle.com
Tue Aug 21 11:49:51 PDT 2007
Jeff Dexter wrote:
> 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).
I think a strong argument could be made that a criteria for being a well
designed XML document is the ability to tell an element's type from it's
name - or at least from the path to it. This is why I said XML /could
be/ self describing.
Of course, there are plenty of badly designed XML formats out there.
> 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.
If the only way to provide schema evolution is to plan it into the
schema from the start or to turn off strict schema checking, I'd say
that was good evidence of something being broken.
> 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.
That's an interesting use case, but it's a long way from "ddl=xml schema".
More information about the talk