May 28, 2013

Best Practices for Processing LOB and XML Data

DB2 has long supported LOB and XML data processing. LOB support goes all the way back to the GA of DB2 6 in 1998. XML support, I believe, debuted in DB2 7 as a bolt-on using XML extenders.

However, neither introduction went smoothly. When first unveiled, LOB support had many performance implications, which caused most customers to avoid storing data in LOBs. And due to the complexity and lack of integration with the DB2 optimizer, customers were very slow to adopt XML. To its credit, IBM has addressed these issues through the years, and thanks to significant performance improvements, customers are increasingly using LOBs.

On the other hand, even though native XML data type support was delivered with DB2 Version 9.1 in 2007, use of XML on DB2 for z/OS continues to be minimal. Perhaps this stems from the fact that XML processing has changed so dramatically through time. It started as local, host-based processing, then went to client/server applications development in C and C+. Now processing is done through web applications using Java.

I’ve written extensively on the use of XML over the years. It's an improved solution thank to enhancements in the DB2 optimizer as well as greater support for developers using XML on z/OS. If you've avoided storing XML DB2 on z/OS because of performance or the lack of XQUERY and XPATH functionality, I believe you should reconsider.

There are two important resources that bring you the latest techniques and best practices for processing LOB and XML data. The first is the DB2 10 for z/OS Application Programming and SQL Guide, which explains how to develop DB2 10 for z/OS applications using languages such as Assembler, C, COBOL, Fortran, PL/I and Rexx. If you're interested in Java development, you should check out the DB2 10 for z/OS Application Programming Guide and Reference for Java.

If you've done LOB and XML development and taken advantage of some of the new features in DB2 10, I'd like to hear from you. Same goes for those who are new to working with LOB and XML data in DB2 for z/OS. Please share your experiences in comments.