SQL/XML
SQL / XML specifies SQL - based extensions for using XML in conjunction with SQL. The new XML data type as well as various routines, functions, and XML -to -SQL and SQL -to- XML mapping are introduced to support manipulation and storage of XML in a SQL database.
SQL / XML is the SQL database language defined in Part 14 XML -Related Specifications ( SQL / XML) of ISO / IEC 9075. The standard is not freely available, but there is a ZIP archive with a design from 2008 ..
Description
The SQL / XML specification includes functions to construct XML data. These functions allow the user to new elements or attributes with values from relational tables to construct. Other functions, such as XMLCONCAT or XMLAGG can be used to merge small XML fragments into larger ones. The list of available design functions is:
- XMLELEMENT
- XMLATTRIBUTES
- XMLFOREST
- XMLCONCAT
- Xmlnamespaces
- XMLCOMMENT
- XMLPI
- XMLDOCUMENT
- XMLAGG
- Etc.
SQL / XML but also defines functions that allow the user to use XQuery expressions in SQL statements. These functions are:
- XMLQUERY
- XMLTABLE
While XMLQUERY returns values of type XML, the XML XMLTABLE function can use data as input and produce a relational table as output. Properties of XML data can be expressed, for example with the XMLEXISTS predicate, typically in a WHERE clause of an SQL statement.
Standards Compliance
On the said draft of the ISO standard and the evaluation of the SQL / XML standard is based :2006- compliance of Oracle 11g Release 1, MS SQL Server 2008 and MySQL 5.1.30 of Wagner. The result of this evaluation is shown in the following table:
Due to the hardly appreciable changes in SQL / XML: 2008 compared to SQL / XML: 2006, above mentioned installation are still valid.