SQL/XML or XML-Related Specifications is an extension to the Structured Query Language (SQL) specification, which defines the use of XML in conjunction with SQL. The XML data type is introduced, as well as several routines, functions, and XML-to-SQL data type mappings to support manipulation and storage of XML in a SQL database. SQL/XML is defined by ISO/IEC 9075-14 and is complementary to XQuery.[1]
Contents |
The specification defines functions for working with XML, including element construction, mapping data from relational tables, combining XML fragments, and embedding XQuery expressions in SQL statements. Functions which can be embedded include XMLQUERY (which extracts XML or values from an XML field) and XMLEXISTS (which predicates whether an XQuery expression is matched).
Further information and examples of the SQL/XML functions are provided in the external links below[2][3][4].
The result of Wagner's objective evaluation of the SQL/XML:2006 standard compliance of Oracle 11g Release 1, MS SQL Server 2008 and MySQL 5.1.30 is shown in the following table:[2]
Oracle 11g Release 1 | MS SQL Server 2008 | MySQL 5.1.30 | |
---|---|---|---|
Datatype XML | partial | high | no |
SQL/XML predicates | high | partial | no |
SQL/XML functions | high | partial | low |