EIEIOTECHNOVATION
← Training programmes

EIEIO / DATA SCIENCE

Query and Manage XML Data with DB2 9

Reference course outline

CG134 days

DURATION

4 days

This course is designed to introduce the students to non-traditional ways of using DB2 to work with native XML data. It is also designed to enable database administrators to manage the DB2 - native XML environment.

The students query XML data stored in DB2 tables and create XML documents from traditional DB2 data. They access XML documents as though the documents were relational tables. This content is addressed in the first two days of class and can be taken by users or other personnel who only need to access XML data stored in DB2 tables.

In the last two days of class, the students store native XML data in DB2 and create XML indexes. They analyze plan information for queries and take steps for improving query execution. The course also teaches how to manage the XML schemas and the techniques available for decomposing the XML documents.

Audience

This course is for:

Users

Database administrators

Anyone interested in learning how to retrieve native XML data and how to handle native XML data in DB2.

Prerequisites

There are no Prerequisites for this course.

Objectives

After completing this course, you should be able to:

Use XQuery to retrieve documents from an XML column

Use SQL/XML retrieval, publishing, and shredding functions

Use Developer Workbench to understand how to build XML queries and queries that contain SQL/XML

Establish the environment to store native XML data in DB2

Create XML indexes for efficient retrieval of XML data

Analyze query executions and what you can do to improve the query performance

Validate and register XML schemas using commands

Annotate XML schemas and decompose XML documents using commands

Use Developer Workbench to annotate XML schemas for decomposition, and register XML schemas for validation, decomposition, or both

Course outline

XML Basics Review

Differentiate between relational data and XML

Explain the importance of XML

Describe why and when XML can be advantageous

Introduction to XPATH

Describe the reasons for using XPath

Define the components and constructs that make up the XPath language

Identify abbreviated XPath expressions

Write simple XPath expressions to navigate through XML documents

Introduction to XQuery

Describe the XQuery and XPath data model

Retrieve DB2 data using XQuery functions

Construct the most often used FLWOR (for, let, where, order by, and return) expression

SQL/XML

Using the SQL/XML built-in functions, you should be able to:

Retrieve XML data

Publish XML data

Advanced queries

Use conditional (if-then-else) logic

Include arithmetic calculations

Join XML data in different tables

Join relational and XML data

Embed XQuery inside SQL

Pass parameters

Developer Workbench XML tools - Build XML query (XMLQUERY)

Create XML queries (XMLQUERY) using the XML Query Builder

Create queries containing SQL/XML using the SQL Builder

Introduction to XML storage

Distinguish between transient and persistent XML data types

Describe how XML data is stored in DB2

Use different techniques to handle XML data in and out of XML storage

Use IMPORT and EXPORT utilities with XML data

XML indexing

Describe the new index structure

Create indexes on XML columns

Explain the DB2 catalog changes to support the new index structure

Use db2dart tool to format the index

Optimization and performance

Discuss the pros and cons of the different options for querying XML data

Design XML queries and indexes in a consistent manner so that indexes can be used as much as possible

Describe other XML performance guidelines, for example, for XML inserts and XML schema validation

XML schema management

Register XML schema

Validate XML document using XML schema

Remove XML schema

Administer Grant and Revoke privileges

XML decomposition

Annotate XML schema for a document

Decompose XML document

Control what data is inserted

Developer Workbench XML tools - XML decomposition

Annotate XML schemas for decomposition

Register XML schemas for validation and/or decomposition

Migrating XML applications to DB2 9

Describe the migration impact on databases

Describe the migration impact on SQL queries

Describe the migration impact on XML applications

Agenda

Day 1

Welcome

Lab exercise

Lab exercise

Day 2

Lab exercise

Lab exercise

Lab exercise

Day 3

Lab exercise

Lab exercise

Day 4

Lab exercise

Lab exercise

Lab exercise

Lab exercise

Wrap-up

This is a version-specific reference outline. Confirm the current syllabus and delivery arrangements with EIEIO.