Feed Icon  


  • Bryant Likes
  • Send mail to the author(s) E-mail
  • twitter
  • View Bryant Likes's profile on LinkedIn
  • del.icio.us
Get Microsoft Silverlight
by clicking "Install Microsoft Silverlight" you accept the
Silverlight license agreement

Hosting By

Hot Topics


Open Source Projects



Michael Rys Clarifies Xml in Yukon

Posted in Sql and Xml at Friday, April 16, 2004 12:56 AM Pacific Daylight Time

Michael Rys clarifies some old comments by Euan Garden about the Xml datatype in Yukon.

If you store the XML instance in an XML datatype, we will use an XML Reader that will parse the XML and store it in an internal binary format that - among other things - is efficiently mappable into an internal relational form that most queries execute over. That relational form can be generated by the primary XML index to avoid the runtime generation during queries and updates (see below). The XQuery and update expressions are being translated into internal algebra operations that work against the internal relational form.

I think this confirms some of my ideas about how XML will be stored in Yukon. SQL Server's strength is relational data, so it makes sense to make use of that strength when it comes to XML. It almost sounds like they are basically doing the OpenXML for you instead of forcing you to do it. To me this seems like a good thing since you will get the performance of SQL Server plus the flexibility of XML. Of course you will pay some overhead costs for this added flexibility, but in many cases it will be more than worth it.

Programmers also have the ability to define additional secondary indices on the primary XML index to index values, names, paths etc. The optimizer will use them to answer queries more efficiently as appropriate.

This is going to be very cool. XML indexes on paths (I'm assuming that means XPaths). So you can store your XML document and index it, does this mean you can have a foreign key in your XML document column?

Euan: Supporting XQuery now allows us a much richer query language for insert, update and select operations. And we've also implemented this in a way that allows us to mix and match relational and XML data....

Michael: On this I have no additional comment :-)

If you haven't started to read up on XQuery, you might want to seriously consider it. Combining XML and relational data via XQuery sounds like a very cool feature, but you will need to know XQuery to use it. I'm still waiting for the post office to deliever my copy of XQuery from the Experts which I've been told is the book to get (I won't say who told me that but I will say they probably have a biased opinion :)).

Update: Dare comments:

Very interesting stuff, the notion of an XML datatype baked into the SQL Server engine. Truly the rise of the ROX [Relational-Object-XML] database has begun.


Comments are closed.