Abstract

This chapter focuses on SQL/XML that is still a relatively new part of the SQL standard, but provides a powerful basis for storing, managing, and querying XML data, leveraging both the power and robustness of SQL and the XML-centric capabilities of X-Path and X-Query. The goal of the SQLX Group is to define a set of extensions to the SQL standard to integrate SQL and XML, supporting bi-directional movement of data and allowing SQL programmers to manage and query XML data. The first useful query functionality of the SQL/ XML effort is the ability to publish the results of a SQL query to XML. However, to publish an XML report summarizing relational data, XMLAGG function is used to aggregate all the similar XML elements into a single element. XMLCONCAT takes a list of XML values and concatenates them into a single XML value. Whereas, XMLQUERY is a function that fits naturally in the SQL SELECT clause. It takes an XQuery string (i.e., an XQuery expression in a string), plus arguments for XQuery variables and the context item, and returns an XML value. The other XQuery functions discussed are XMLEXISTS and XMLTABLE. For the last several decades, most of the world's critical data has been stored in SQL databases, managed and queried using the SQL language. More recently, people have turned to XML to represent their data in a more natural way, and they need a new language to manage and query that data — a language that takes account of the structure of an XML document as well as its data values.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call