




Get principles and guidelines for using IBM® DB2® pureXML™ to solve business problems effectively and to achieve high performance when managing XML data in enterprise applications - illustrated with a real-world example easily adapted to other types of XML applications.
This paper provides principles and guidelines for using DB2 pureXML™ to solve
business problems effectively and to achieve high performance when managing XML
data in enterprise applications. The examples illustrating the best practices are based on a
real-world financial application scenario and demonstrate how to implement the
guidelines. The examples can be easily adapted to other types of XML applications. The
paper covers the following areas: - Storage options for XML data to improve performance and storage efficiency
- Techniques for adding XML data into a DB2 database
- Techniques for querying and updating XML documents efficiently
- Techniques for using indexes over XML data with queries effectively
- Techniques for efficiently maintaining and monitoring an XML database
- Techniques for developing efficient pureXML applications
- Executive summary
- Why XML
- Pros and cons of XML and relational data
- XML solutions to relational data model problems
- Benefits of DB2 pureXML over alternative storage options
- Best practices for DB2 pureXML: Overview
- Sample scenario: derivative trades in FpML format
- Sample data and tables
- Choosing the right storage options for XML data
- Selecting table space type and page size for XML data
- Different table spaces and page size for XML and relational data
- Inlining and compression of XML data
- Guidelines for adding XML data to a DB2 database
- Inserting XML documents with high performance
- Splitting large XML documents into smaller pieces
- Storing trades in a hybrid fashion
- Ensuring XML data quality at insert time
- How to query XML data efficiently and effectively
- Choosing SQL/XML vs. XQuery: What are the pros and cons of each?
- Join queries involving XML data
- Properly using * and // in XQuery and SQL/XML queries
- Limiting returned rows and avoiding empty rows in SQL/XML queries
- Writing XMLTABLE queries
- Usage guidelines for XML indexes
- Defining indexes
- Using indexes in XML queries
- Dealing with XML namespaces
- Declaring XML namespaces
- Namespaces in queries
- Namespaces in index definitions
- Effectively updating XML data
- Guidelines for simple XML updates
- Merging data from multiple XML documents
- Enriching XML documents with relational data
- Maintaining and monitoring an XML database
- Collecting statistics on XML data
- Monitoring XML workloads
- Using REORG and backup and restore utilities with XML data
- Developing pureXML applications
- Use parameter markers for short XML queries
- Avoid code page conversion between DB2 and the application
- Access XML data in DB2 via a DOM or SAX API
- Best Practices
- Summary
- Further Reading
- Notices
"
Best Practices:
Managing XML Data
"
(May 2008) Get principles and guidelines for using DB2 pureXML™ to solve business problems effectively and to achieve high performance when managing XML data in enterprise applications - illustrated with a real-world example easily adapted to other types of XML applications. (pdf; 930KB; 77 pages)
Download the sample
code for this
paper.
Comment, edit, or add your own insights to the Managing XML Data best practices
on the IBM Database Wiki.
Check out all the other Best Practices papers and see how you can improve your experience with DB2 for Linux, UNIX, and Windows.
|