Data Direct Support for IBM DB2

IBM DB2 databases are best supported by the DataDirect XQuery® processor. DataDirect XQuery® allows you to query relational tables in the same way as XML documents, making it easy to publish both relational and XML data as XML. DataDirect XQuery® is particularly useful for XML publishing and reporting, and for data integration. DataDirect XQuery® runs on any Java platform, and is easily embeddable into almost any Java program. DataDirect XQuery® works with any J2EE Application Server, although no application server is required.


Following are just some of the reasons why DataDirect XQuery® is the best XQuery processor for querying relational data stored in IBM DB2 databases.

Efficient Query Execution

Relational databases often hold massive amounts of data, so DataDirect XQuery® uses a very efficient way to query them — but hides this from the query author. Using DataDirect XQuery®:

  • To the XQuery query, a table looks like an XML document
  • To the relational database, an XQuery looks like efficient SQL

Data is not extracted in order to query it; instead, DataDirect XQuery® generates SQL and executes that SQL on the server, enabling you to retrieve just the data needed to construct the results for a given XQuery.

SQL Optimizations

One key advantage of DataDirect XQuery® over other XQuery processors is that it decomposes your XQuery and translates it to SQL. The benefits of such a translation, of course, are enormous, especially in terms of the performance and efficiency with which your XQuery applications will run. Once converted to SQL, the query is pushed to the database server and executed there. In the database environment, the SQL is able to take advantages of your database's indexes and primary key/foreign key relationships, speeding data access and retrieval.

Other XQuery processors are unable to convert XQuery to SQL, leaving them with no choice but to fetch the entire table from the relational database and return it to the client side, where it is then converted, in its entirety, to XML. This might work fine with trivial queries or very small relational tables, but it is not an approach that scales, or even one that offers reasonable performance for real-world data integration and aggregation.

XML Optimizations

Query results are returned to DataDirect XQuery® as tabular data, which is then easily converted to XML. Once converted to XML, DataDirect XQuery® uses data streaming and document projection technologies to focus on only those elements and attributes that are relevant to the query, minimizing in-memory processing. This approach allows for fast and efficient processing of very large XML documents (1 gigabyte and larger!). Relational joins and other complex query structures pose no problem for the DataDirect XQuery® processor.

Easy Database Connectivity

Configuring and connecting to a IBM DB2 server is easy. You can use an XML IDE like DataDirect's Stylus Studio to quickly define server configurations and connect to that server, using a simple dialog box like the one shown here:

And it's easy to create and reuse default database connections, too.

Even without an XML IDE like Stylus Studio, defining IBM DB2 database connections is easily accomplished using the XQuery API for Java (XQJ), whose interfaces are implemented by DataDirect XQuery®. You simply need to define data source and connection expressions, like the ones shown in the following code sample, in your Java application, and you're all set.

Transparent Access to Relational Data as XML

Once you have connected to a relational data source, Stylus Studio and the Editor for Eclipse makes it easy for you to automatically create XQuery code. Using Stylus Studio, for example, you just drag and drop a table from the File Explorer window, exposing all the tables from that tablespace as potential data sources. Next, drag the table you want to query and drop it on the XQuery Source tab — Stylus Studio automatically creates perfect XQuery code based on the table you choose. These easy steps are summarized in the following illustration.

And when you're done building and testing your XQuery code, you can quickly generate Java code that you can embed in a Java application.

IBM DB2 Version Support

DataDirect XQuery® supports the following versions of IBM DB2:

  • IBM DB2 UDB v8.1 and 8.2 for Linux, UNIX, and Windows
  • IBM DB2 UDB v8.1 for z/OS (formerly OS/390)
  • IBM DB2 UDB V5R2 and V5R3 for iSeries (formerly AS/400)

Support for Other Relational Databases

DataDirect XQuery® also provides support for the following relational databases:

Support for Other Non-XML Data Sources

DataDirect XQuery® also provides support for non-XML sources like these:

IBM DB2 Support in DataDirect XQuery® Now!

DataDirect XQuery® is now released!

DataDirect XQuery® supports the XQuery Candidate Recommendation with enhanced performance and scalability, support for very large XML files, XML adaptors for flat file and EDI formats, IBM DB2 databases, and more.

Download now!

Back to School with DataDirect XQuery®

Getting your mind around the possibilities of a data integration technology as promising as XQuery can be difficult, but our XML developers Webinars will help you understand the power and versatility of XQuery, and our favorite XQuery processor, DataDirect XQuery®.

From information about how to leverage relational data to real-world use cases, our Webinars will help you see why DataDirect XQuery® is the best choice for today's tough data integration and aggregation challenges.

DataDirect XQuery FAQ

This informative DataDirect XQuery® FAQ answers frequently-asked questions about DataDirect XQuery®, including questions about performance, scalability, use-cases, resources, and more.

If you're more of a hands-on learner, then download a free copy and start exploring DataDirect XQuery® today!

New Case Study

Gevity produces sales proposals in real time using DataDirect XQuery®. See how Gevity uses DataDirect XQuery® to combine Web service data from SalesForce.com with relational data in IBM DB2 in a pricing engine for HR management.

Where is XQuery Heading

We've collected numerous reports and surveys to help you understand the lay of the XQuery land and how DataDirect XQuery® can help you launch your data integration applications to new heights.

From XML industry observers to surveys of your peers, see why DataDirect XQuery® is right for you. Or better yet, try DataDirect XQuery® today for free!

DataDirect XQuery® and Document Projection

Querying large — over one Gig! — XML documents is no problem for DataDirect XQuery®, which uses document projection and data streaming technologies to efficiently query XML. Read about it, and then try DataDirect XQuery® for free and see for yourself.

Are You Ready for the XQuery Revolution?

XQuery is poised to change the data integration application landscape. This first-ever informative industry survey will let you know what your peers are up to and how they are putting XQUery to work today.

After reading the survey try DataDirect XQuery® for free and see for yourself.

Use DataDirect XQuery® to Mine IBM DB2 Data!

This informative XQuery webinar shows you how scalable, flexible, and reliable DataDirect XQuery® is for building XML applications that access data from IBM DB2, XML, Web services and legacy formats; and how it uses document projection and data streaming technologies to efficiently query large (Gigabytes) XML documents.

Check our XQuery Webinars page for more information on this and other Webinar topics.

DataDirect XQuery® Data Integration Solutions

DataDirect XQuery® offers solution to real-world problems like data integration, accessing Web services data, XML publishing, and more.

Download a free copy and try DataDirect XQuery® today!

DataDirect XQuery® Features

With tools for accessing IBM DB2 data as XML, XML publishing, and full XML IDE support, to name a just a few, DataDirect XQuery® is loaded with these and other features that will make building your next data integration application a snap.

Download your copy today and see for yourself!