(Ignoring the performance issue mentioned below altogether, since that is an implementation difference only)<br><br>Wouldn&#39;t
it be great to use XQuery to access or modify relational data AND XML
data instead of SQL/XML? I&#39;m sure there are a few SQL/XML enthusiasts
out there, but XQuery just makes so much more sense in my brain that
equivalent SQL. Having no influence other than my persuasive voice, I
really wish someone would boil the SQL ocean and magically switch the
world to a more XQuery-like language...<br><font color="#888888">
<br>Brian Maso</font><br><br><div class="gmail_quote">On Mon, Jun 15, 2009 at 9:13 PM, Ronald Bourret <span dir="ltr">&lt;<a href="mailto:rpbourret@rpbourret.com">rpbourret@rpbourret.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
To clarify:<br>
<br>
1) SQL/XML defines an XML data type, a syntax for constructing XML values from relational data, and functions for executing XQuery queries against XML values, creating tables from XML values/sequences, etc. It&#39;s worth noting that XML values are the same as XQuery sequences -- that is, not necessarily well-formed.<br>

<br>
2) Oracle and DB2 implement SQL/XML. SQL Server implements the XML data type from SQL/XML, but uses a non-standard syntax for creating XML values from relational data.<br>
<br>
3) Lots of things are non-standard. As Michael mentioned, there is no standard way to define an index on an XML value. Also not standard are things like whether you can directly execute an XQuery statement or need to embed it in an SQL statement; how to query relational values from within an XQuery statement; how XML results are retrieved from a result set (JDBC 4.0 defines this); and so on.<br>

<br>
4) Different databases implement the XML data type differently, and these implementation choices can lead to large differences in performance. (Performance is obviously also query- and index-dependent.)<br>
<br>
-- Ron<br>
<br>
David A. Lee wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Not sure about a &quot;standard&quot; but the top DB vendors have done this already years ago<br>
<br>
Oracle:<br>
<a href="http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb13gen.htm#i1027254" target="_blank">http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb13gen.htm#i1027254</a> <br>
<br>
MS/SQL<br>
<a href="http://msdn.microsoft.com/en-us/library/aa286527.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/aa286527.aspx</a><br>
<br>
DB2<br>
<a href="http://www.ibm.com/developerworks/db2/library/techarticle/dm-0603saracco2/" target="_blank">http://www.ibm.com/developerworks/db2/library/techarticle/dm-0603saracco2/</a><br>
<br>
But if you think SQL is incomprehensible, take a gander at what you have to do with these (above) implementations to get XML out ....<br>
<br>
Give me pure XQuery any day :)<br>
</blockquote><div><div></div><div class="h5">
_______________________________________________<br>
<a href="mailto:talk@x-query.com" target="_blank">talk@x-query.com</a><br>
<a href="http://x-query.com/mailman/listinfo/talk" target="_blank">http://x-query.com/mailman/listinfo/talk</a><br>
</div></div></blockquote></div><br>