Leveraging the XML features of DB2 V9 in the Workplace Forms solution
Introduction: Learn how to use IBM DB2 V9 as a repository for storing form data, and how to integrate DB2 and IBM Workplace forms. DB2 V9 introduces the ability to store XML data in native format, providing an ideal integration with the xml-based architecture of the Workplace forms form.
Typically, a relational DBMS stores XML data as a single column-row entity (such as a CLOB, BLOB, or VARCHAR), or decomposes ("shredded") XML data into multiple columns. These methods pose problems for many applications, including increasing the complexity of development and querying, making it difficult for schemas to meet new business requirements, and poor subdocument query Run-time performance. By storing XML data locally in a database, users can now take full advantage of the new XML query functionality, using the robust indexing and data storage capabilities of the DBMS, and taking into account the growth and changes in the XML schema.
The IBM Workplace forms document is fully described in XML format, and it is an ideal match to keep these forms in a database that can be managed in the native form of XML. The entire architecture described in this article is shown in Figure 1. The form includes a Submit button that performs an HTTP post that is uploaded to the back-end servlet. The servlet uses the IBM Workplace Forms Server API to extract data, manipulate the form, or perform both of these operations. In addition, you can perform any other business logic, such as placing a form on a workflow process. Finally, the servlet uses the IBM DB2 JDBC API to store the form in IBM DB2 V9.
Figure 1. Entire architecture
The remainder of this article is divided into a series of steps that describe:
How to set up integration prerequisites
How to add a Submit button to a form.
How to implement the servlet and save the form (and its xml-based data instances) in DB2 V9
How to use DB2 V9 control Center to verify that the form data has been successfully stored