Introduction

DB2 pureXML comes with a comprehensive set of XML querying features. You can query XML data stored in the database by using SQL statements or XQuery expressions or a combination of both.

DB2 provides XML query functions or predicates that can be used with SQL statements. These statements are known as SQL/XML. XQuery, on the other hand, is a programming language designed for querying and modifying XML data. You can use XQuery to retrieve an entire XML column or XML values that are based on an SQL select statements.

SQL/XML and XQuery are both first class languages in DB2. DB2 optimizer will recognize and provide an optimal access plan based on the database statistics.

In this tutorial, the following pureXML querying features are demonstrated:


Workshop prerequisites

If you have not already done so from the previous tutorial in the pureXML workshop, create the database objects required presented on the right pane.