EIEIOTECHNOVATION
← Training programmes

EIEIO / DATA SCIENCE

Query XML data with DB2 9

Reference course outline

CG102 days

DURATION

2 days

This course is designed to introduce you to non-traditional ways of using DB2 to work with native XML data.

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 class can be taken by users or other personnel who only need to access XML data stored in DB2 tables.

Audience

This advanced course is for:

Users

Database administrators

Anyone interested in learning how to retrieve native XML data in DB2

Prerequisites

You should have at least introductory knowledge of XML, XML-related concepts, and DB2 concepts. You should also have working knowledge of SQL.

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

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 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

Agenda

Day 1

Welcome

Lab exercise

Lab exercise

Day 2

Lab exercise

Lab exercise

Lab exercise

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