- Tel: +44 (0)1275 859666
UD12 - DB2 for LUW - XML Workshop - 1 Day
Course Description
This course is aimed at DBAs and Programmers who need to understand how use DB2 to store and manipulate XML data.
During the course the delegate will learn how to define XML columns, create XML indexes, LOAD / parse XML documents and manipulate XML data both from within a program and using XQUERY / XPATH expressions.
Pre-requisites
A strong knowledge of using DB2 is required to attend this course. Athough the first section of this course contains an overview of XML, prior XML knowledge is advantageous. This can be gained by attending course EC50 - XML Introduction.
Objectives
The aim of this course is to provide the programmer, already familiar with DB2 applications program development, with the necessary skills required define, load and manipulate XML data.
On completion of this course the student will be able to:
- define XML columns
- define XML indexes
- understand implicit XML object creation
- access and manipulate XML from a program
- use XML functions
- manipulate XML from within a program
- use File Reference Variables
- use XQUERY / XPATH expressions
- run LOAD, REORG and COPY with XML data
Environment
Development will be performed using:
- DB2 for Linux, Unix and Windows
- COBOL, PL1 or Java if applicable
Customisation
For on-site courses (i.e. at your premises), we are more than happy to tailor the course agenda to suit your exact requirements. In many cases, we are able to build your in-house standards and naming conventions into the delivered course.
Course Details
- OVERVIEW OF XML
- XML Document Structure
- Tags & Elements
- Attributes
- Well Formed Documents
- Valid XML Documents
- Viewing an XML Document
- Using CSS Style Sheets
- Using XSL Transformations
- Tags & Elements
- XML SYNTAX
- XML Documents
- XML Declaration
- Elements
- Element Hierarchy
- Empty Elements
- XML Names
- Entity References
- CDATA Sections
- XML Declaration
- NAMESPACES
- Namespace Definition
- Uniform Resource Identifier
- Namespace Syntax
- Binding Prefixes to Namespace URIs
- Default Namespaces
- Non-Default Namespaces
- Uniform Resource Identifier
- XML GRAMMARS
- XML Validation
- XML Parsers & Validators
- Document Type Definitions
- XML Schemas
- XML Parsers & Validators
- DOCUMENT TYPE DEFINITION (DTD)
- DTD
- Definition
- Declaration
- Formats
- DTD Declaration
- Internal Declarations
- External Private Declarations
- External Public Declarations
- DTD Content
- !ELEMENT Declaration
- Content Model
- !ATTLIST Declaration
- Attribute Type
- Processing Instructions
- Definition
- XML SCHEMAS
- Schema Status
- Schema Elements & Attributes
- Simple Types
- Complex Types
- Elements
- Attributes
- ComplexType
- Compositors
- Sequence
- Choice
- All
- Attributes
- Empty Elements
- Attaching an XML schema to an Instance Document
- XML Schema
- Schema Structures
- Using References
- Using Groups
- User-defined Simple Types
- User-defined Complex Types
- Content Type Libraries
- Schema Elements & Attributes
- XML SUPPORT / PUREXML
- eXtensible Markup Language Introduction
- XML Terminology
- An XML Document Example
- XML Data Model
- Well Formed Documents
- Valid Documents
- Version 9 Enhancements - Overview of pureXML
- XML Data Type
- Adding XML Columns to a Table
- Node Storage
- Relational Data vs XML (Hierarchical) Data
- The DB2 XML Parser
- Schema Validation - The XML Schema Repository (XSR)
- Accessing XML Data
- Summary Of Xml Functions
- Sample Data used in Examples
- XMLSerialize Function
- XMLElement Function
- XMLAttributes Function
- XMLForest Function
- XMLConcat Function
- XMLAgg Function
- XMLNamespaces Function
- XMLComment Function
- XMLPi Function
- XMLText Function
- XMLDocument Function
- XMLParse Function
- XPath Specification
- XML Document used in Examples
- Xpath Function - XMLQuery
- Xpath Function - XMLExists
- Xpath Function - XMLCast
- Xpath Function - XMLTable
- XPath Axes
- XPath Functions
- XML Indexes
- Logical and Physical Indexes
- Index Considerations
- Schema Validation
- XQuery Examples
- XPath Examples
- FLOWR Examples
- Application development
- Utilities
- XML Terminology
- XQUERY
- XQuery Introduction
- XPath Expressions
- XPath Terminology
- Relationship of Nodes
- Selecting Nodes
- Specifying XPath Predicates
- Selecting Unknown Nodes
- Selecting Several Paths
- XPath Axes
- Location Path Expression
- XPath Operators
- Using XQuery with DB2
- Using XQuery with Xpath Expressions
- Further XQuery / DB2 Functions
- FLWOR Constructs
- FLWOR Constructs - FOR Clause
- FLWOR Constructs - WHERE Clause
- FLWOR Constructs - RETURN Clause
- FLWOR Constructs - ORDER BY Clause
- FLWOR Constructs - LET Clause
- FLWOR Constructs - Built In Functions
- Combining FLWOR and SQL Statements
- XPath Expressions
- DEVELOPER WORKBENCH
- The Developer Workbench
- Connecting To DB2 from the Workbench
- Creating a Project
- Creating a Stored Procedure
- Parameter Specification
- Running the Stored Procedure
- Debugging the Stored Procedure
- Using the Workbench to Develop XML Queries
- Constructing the XML Query
- Running the XML Query
- Filetring the XML Query
- Connecting To DB2 from the Workbench
- DB2 PROGRAMMING WITH XML DATA
- XML Data Manipulation
- Inserting Or Updating XML Values
- Declaring XML Host Variables
- Example Using XML Variables
- XML Manipulation
- Using XML Locators
- Declaring XML Locator Host Variables
- Holding Locators
- Freeing Locators
- Example Using XML Locators
- XML Limitations
- XML Locator Considerations
- XML Locators and XML Integrity
- File Reference Variables
- Defining File Reference Variables
- File Reference Variables - Example
- Loading Data using File Reference Variables
- File Reference Variables - New DSNZPARM
- Fetch Continue
- Fetch Continue Example
- Fetch Continue Considerations
- Locking XML Data
- XML Locking Summary
- XML Tablespace Logging
- XML Bufferpool Management
- Inserting Or Updating XML Values
Course Format
The course contains many practical exercises to ensure familiarity with the product. On completion of this course students will be able to develop application programs which use advanced programming techniques.
The comprehensive Student Guide supplied is fully indexed serving as a useful reference tool long after the course has finished. Delegates will also be able to access a free help-line with technical questions relating to topics covered on the course.