XML and Db2

You can use XML in a Db2 database. XML, which stands for Extensible Markup Language, is a text-based tag language. Its style is similar to HTML, except that XML users can define their own tags.

The explosive growth of the Internet was a catalyst for the development and industry-wide acceptance of XML. Because of the dramatic increase of on demand business applications, organizations need to exchange data in a robust, open format. The options that were available before the development of XML were Standard Generalized Markup Language (SGML) and HTML. SGML is too complex for wide use on the web. HTML is good for the presentation of web pages, but it is not designed for the easy exchange of information. XML has emerged as a useful and flexible simplification of SGML that enables the definition and processing of documents for exchanging data between businesses, between applications, and between systems.

You can think of HTML as a way of communicating information between computers and people. You can think of XML as a way of communicating information between computers. You can convert XML to HTML so that people can view the information.

Benefits of using XML with Db2 for z/OS

With XML data in Db2 for z/OS, organizations can gain the following benefits:

Improved customer relationships
XML lets you deliver personalized information to customers, enable new distribution channels, and respond faster to customer needs.
Optimized internal operations
With XML, you can drive business data from your existing systems to the Web. XML enables you to automate transactions that do not require human interaction.
Maximized partnerships
Because of the widespread use of XML in the industry, you can easily share information with suppliers, buyers, and partners.
Tools and software
You can take advantage of many XML tools and software, such as WebSphere® Studio, XML parsers and processors, and the SQL/XML publishing function.

XML vocabularies exist for specific industries to help organizations in those industries standardize their use of XML. An XML vocabulary is an XML description that is designed for a specific purpose. Widespread industry use of XML has resulted in more effective and efficient business-to-business transactions.

Ways to use XML with Db2 13 for z/OS

Organizations use XML for document processing and for publishing information on the web. There are various publishing functions and tools that help you integrate XML with Db2 data.

To integrate XML with Db2 data, you can use the SQL/XML publishing functions. The native XML, or pureXML®, support in Db2 offers efficient and versatile capabilities for managing your XML data. Db2 stores and processes XML in its inherent hierarchical format, avoiding the performance and flexibility limitations that occur when XML is stored as text in CLOBs or mapped to relational tables.

SQL/XML publishing functions allow applications to generate XML data from relational data. XML is a popular choice when you want to send Db2 data to another system or to another application in a common format. You can choose from one of several ways to publish XML documents:

  • Use SQL/XML functions that are integrated with Db2.

    Db2 integrates SQL/XML publishing functions into the Db2 product. A set of SQL built-in functions allows applications to generate XML data from Db2 data with high performance. The SQL/XML publishing functions can reduce application development efforts in generating XML for data integration, information exchange, and web services.

  • Take advantage of Db2 web services support.

    Web services provide a way for programs to invoke other programs, typically on the Internet, that transmit input parameters and generate results as XML.

  • Use a tool to code XML.

    WebSphere Studio provides a development environment for publishing XML documents from relational data.