4 SQL/XML

This section is under development

The SQL/XML standard defines the mechanisms to produce XML formatted results from relational queries and to import relational data from XML documents. The SQL/XML 2003 definition and its enhancements in SQL/XML 2005 are the frame of reference.

The implementation in MonetDB/SQL is initially geared at providing the basic functionality for publishing XML and simple querying. A more complete and optimized implementation of XQuery is already available with MonetDB/XQuery. However, data between the two systems is not shared. They are managed by a different server implementation.

SQL/XML introduces a new datatype xml. It can be used as a column type in table, view definitions, parameters, and variables. The datatype tells the system that values are properly structured XML objects.

The SQL/XML implementation uses the string type as the carrier for XML values and relies on the widely available library libxml2 for additional functionality. It is a poor man's approach compared to MonetDB/XQuery.