
Front cover Draft Document for Review December 29, 2006 1:50 pm SG24-7315-00 DB2 9 pureXML Guide Learning SQL/XML, XQuery, XPath with working examples Developing XML applications with DB2 pureXML Managing XML for maximum return Whei-Jen Chen Art Sammartino Dobromir Goutev Felicity Hendricks Ippei Komi Ming-Pang Wei Rav Ahuja ibm.com/redbooks Draft Document for Review December 29, 2006 1:50 pm 7315edno.fm International Technical Support Organization DB2 9 pureXML Guide December 2006 SG24-7315-00 7315edno.fm Draft Document for Review December 29, 2006 1:50 pm Note: Before using this information and the product it supports, read the information in “Notices” on page vii. First Edition (December 2006) This edition applies to DB2 9 for Linux, UNIX, and Microsoft Windows. This document created or updated on December 29, 2006. © Copyright International Business Machines Corporation 2006. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Draft Document for Review December 29, 2006 1:50 pm 7315TOC.fm Contents Notices . vii Trademarks . viii Preface . ix The team that wrote this redbook. x Acknowledgement. xi Become a published author . xii Comments welcome. xii Chapter 1. Introducing DB2 9: pureXML . 1 1.1 Growing importance of XML Data . 2 1.1.1 Growth of XML . 2 1.1.2 The value of XML data . 4 1.2 pureXML overview. 4 1.2.1 Traditional methods for managing XML data . 5 1.2.2 XML data management with DB2 9 . 6 1.2.3 Setting up databases for XML. 7 1.2.4 XML optimized storage and XML data type . 7 1.2.5 Getting XML data into the database . 8 1.2.6 Querying XML data . 8 1.2.7 Query optimization and indexes for XML . 9 1.2.8 XML schema repository and validation . 10 1.2.9 Full text search for XML . 11 1.2.10 Annotated schema decomposition . 11 1.2.11 Application development support . 11 1.2.12 Tools and utilities . 12 1.2.13 Benefits of DB2 pureXML technology . 13 1.3 pureXML usage scenarios. 13 1.3.1 Integration of diverse data sources . 14 1.3.2 Forms and their processing. 15 1.3.3 Document storage and querying . 16 1.3.4 XML for transactions . 17 1.3.5 Syndication and XML feeds . 18 1.3.6 XML as a better data model . 19 1.4 Summary . 19 1.5 References . 19 Chapter 2. Sample scenario description. 21 2.1 Business requirements . 22 © Copyright IBM Corp. 2006. All rights reserved. iii 7315TOC.fm Draft Document for Review December 29, 2006 1:50 pm 2.1.1 Data modeling . 22 2.2 Application description . 24 2.2.1 Loan application . 25 2.2.2 Loan processing . 31 2.2.3 Loan management . 34 2.3 Application setup . 36 Chapter 3. XML database design . 39 3.1 Architecture overview . 40 3.2 Logical database design . 43 3.2.1 XML data type . 43 3.2.2 Relational structure versus XML structure . 44 3.2.3 XML index . 47 3.2.4 Views. 48 3.2.5 XML schema . 49 3.2.6 XML schema design . 51 3.2.7 Industry standards and XML schemas . 57 3.2.8 XML data validation. 61 3.3 Physical database design . 67 3.4 Creating a database . 70 Chapter 4. Working with XML. 73 4.1 XPath. 74 4.1.1 XQuery/XPath data model . 75 4.1.2 Location paths. 78 4.1.3 Using location paths to retrieve nodes of XML document. 80 4.1.4 Predicates . 86 4.2 XQuery . 87 4.2.1 Types, expressions, and functions . 87 4.2.2 FLWOR and selecting XML data. 103 4.2.3 Updating XML data . 120 4.3 XQuery and SQL/XML. 125 4.3.1 XQuery with embedded SQL . 126 4.3.2 SQL/XML. 127 4.3.3 When to use what . 133 4.4 When and how to use namespaces . 136 4.5 Getting XML data in and out of database . 142 4.6 XML full-text search. 153 4.6.1 DB2 Net Search Extender. 154 4.6.2 Preparing the instance for text search . 155 4.6.3 Full-text searching using DB2 NSE. 158 4.6.4 Taking advantage of Net Search Extender text search features. 162 4.6.5 Full-text search considerations . 164 iv DB2 9 pureXML Guide Draft Document for Review December 29, 2006 1:50 pm 7315TOC.fm 4.6.6 The NSE document model . 167 Chapter 5. Managing XML data . 173 5.1 XML indexes . 174 5.1.1 XML index types . 174 5.1.2 Creating XML indexes. 176 5.1.3 How to look up the information for XML index . 181 5.1.4 Access plan. 186 5.1.5 Best practices . ..
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages404 Page
-
File Size-