New XML Features in DB2 10 for z/OS !
November 18, 2010
The release of DB2 10 for z/OS was one of the big topics at IBM’s Information on Demand conference in Las Vegas and at the IDUG Europe conference in Vienna a couple of weeks ago. DB2 10 for z/OS is the brand-new version of the DB2 database for mainframe computers running the z/OS operating system.
If you think the mainframe is dead – think again! Mainframe computers are still running many of the world’s most mission-critical databases and applications. Many leading companies in banking, insurance, telecommunications, manufacturing, logistics, and other industries still rely on the mainframe’s unsurpassed reliability and performance for transaction processing. And the wide-spread adoption of XML does not exclude the mainframe world.
DB2 9 for z/OS introduced pureXML with native XML storage, XML indexing, XML Schema support, SQL/XML queries, and XML support in various DB2 utilities such as load, unload, and others. Overall, the XML support in DB2 9 for z/OS is similar to that in DB2 for Linux, UNIX, and Windows (LUW).
The new XML features in DB2 10 for z/OS include:
- Node-level XML updates: While DB2 9 for z/OS only supported full-document replacement, DB2 10 for z/OS allows you to insert, delete, or modify individual XML elements or attributes within an XML document. This is based on the XQuery Update Facility and is similar to the XML update support in DB2 LUW.
- Stored procedures and user-defined functions (UDFs) can now have parameters and variables of data type XML. This allows for more flexible and more powerful XML application development.
- Binary XML for data transmission between database server and client applications. This new binary encoding reduces the size of XML on the wire and the associated network latency. As a result, XML insert and retrieval operations are faster.
- Concurrency control for XML is now based on a new multi-versioning approach, which allows for higher concurrency and performance. It avoids XML locking for readers. (Note: Multi-versioning does require new function mode.)
- Increased support for native XML date and time data types.
- One or multiple XML Schemas can be assigned to an XML column, as a so-called XML column type modifier. As a result, schema validation happens automatically for insert, update, and load operations. This XML column type modifier can be altered and supports schema evolution.
- XML Schema validation can be offloaded 100% to zIIP and zAAP processors, which reduces CPU cost. This enhancement has also been added to DB2 9 for z/OS (PK90032, PK90040).
- Enhanced XML index support: XML indexes can now be used to for case-insensitive search (if desired) and to check for the existence or absence of an element or attributes regardless of its value. This has been added to DB2 9 for z/OS too (PK80732, PK80735).
- Support for XPath functions fn:matches, fn:replace, and fn:tokenize, which allow for powerful string manipulation.
And there are even more XML enhancements in DB2 10 for z/OS that I haven’t listed above, such as enhancements in utilities like CHECK DATA, LOAD, and UNLOAD. Some of the items on the list above deserve a more detailed discussion and some examples, and I’ll try to get to that in subsequent blog posts. Let me know if you have any specific questions on any of these features.