Jump to content

SQL/XML

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 80.121.139.94 (talk) at 20:24, 7 June 2012 (1) typo xQuery -> XQuery; 2) compliance of datatype XML is only partial (see Wagner's evaluation catalogue)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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 Part 14:

Specification

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].

Standard compliance

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], where the data of PostgreSQL 9.1[5], [6] was added:

Oracle 11g Release 1 MS SQL Server 2008 MySQL 5.1.30 PostgreSQL 9.1
Datatype XML partial high no partial
SQL/XML predicates high partial no partial
SQL/XML functions high partial low high

NOTE: only Oracle and MS-SQL-Server was augmented with XQuery.

References

  1. ^ Funderburk, J. E.; Malaika, S.; Reinwald, B. (2002), "XML programming with SQL/XML and XQuery" (PDF), IBM Systems Journal, 41 (4), retrieved 14 November 2011
  2. ^ a b Wagner, Michael (2010), "1. Auflage", SQL/XML:2006 - Evaluierung der Standardkonformität ausgewählter Datenbanksysteme, Diplomica Verlag, ISBN 3-8366-9609-6
  3. ^ Eisenberg, Andrew; Melton, Jim (2004), "Advancements in SQL/XML" (PDF), SIGMOD record, 33 (3), retrieved 14 November 2011
  4. ^ Eisenberg, Andrew; Melton, Jim (2002), "SQL/XML is Making Good Progress" (PDF), SIGMOD record, 31 (2), retrieved 14 November 2011
  5. ^ PostgreSQL Conformance with ISO 9075-14 (SQL/XML), at PostgreSQL 9.1 documentation.
  6. ^ PostgreSQL 9.1 XML functions, at PostgreSQL 9.1 documentation.