Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

DB2 9 Fundamentals exam 730 prep, Part 7: Introducing XQuery

C. M. Saracco, Senior Software Engineer, IBM
C. M. Saracco is a senior software engineer at the IBM Silicon Valley Laboratory. She has written two books on database management topics (one co-authored with Charles J. Bontempo) and taught seminars in North America, South America, and Europe.

Summary:  DB2® 9 features support for XQuery, an industry-standard language designed expressly for querying XML data. With XQuery and DB2 9 you can retrieve entire XML documents or XML fragments stored in XML columns. You can also specify XML-based filters for queries, transform XML output, and incorporate conditional logic into queries. This tutorial introduces you to DB2's support of XQuery, explains several basic language concepts, and shows how you can write and execute simple XQueries against XML data stored in DB2. This is the seventh in a series of seven tutorials to help you prepare for the DB2 9 Fundamentals exam 730.

View more content in this series

Date:  24 Jul 2006
Level:  Introductory PDF:  A4 and Letter (108 KB | 31 pages)Get Adobe® Reader®

Activity:  26082 views
Comments:  

Before you start

To help you prepare for the DB2 certification exams, this tutorial introduces you to XQuery and its support in DB2. You should already be familiar with DB2 V9 and its pureXML support before taking this tutorial.

This tutorial focuses on using XQuery to query DB2 XML data. It provides very limited discussion on using SQL/XML (SQL with XML extensions) to query DB2 XML data. For more information on DB2's support for industry-standard SQL/XML functions, see Resources.

About this series

Thinking about seeking certification on DB2 fundamentals (Exam 730)? If so, you've come to the right place. This series of seven DB2 certification preparation tutorials covers all the basics -- the topics you'll need to understand before you read the first exam question. Even if you're not planning to seek certification right away, this set of tutorials is a great place to start learning what's new in DB2 9.


About this tutorial

This tutorial explores basic capabilities of DB2's new XQuery support. It reviews key differences between XQuery and SQL, explores XPath and "FLWOR" expressions, and teaches you how to write simple XQueries over DB2 XML data.

This tutorial is for DB2 users who plan to work with XML documents stored in their native hierarchical structures within XML columns of DB2 tables. The material in this tutorial covers XML topics that are addressed in Sections 1, 4, and 5 of the test. You can view these objectives at: http://www-03.ibm.com/certify/tests/obj730.shtml. You should be familiar with basic XML technologies and with DB2's new pureXML support before taking this tutorial. If necessary, consult the Resources for background material.


Objectives

After completing this tutorial, you should be able to:

  • Understand fundamental XQuery concepts
  • Write simple XQueries using several common expressions

Prerequisites

This tutorial is for people familiar with basic XML technology and DB2's new support for pureXML storage and data management. You should understand the hierarchical nature of XML documents, the concept of well-formedness, and how elements and attributes may be used. You should also understand how you can store well-formed XML documents in their native hierarchical structure using DB2 9.


System requirements

You do not need a copy of DB2 to complete this tutorial, but to run the examples you need a system on which DB2 9 is installed. Any supported platform will be sufficient, but some of the examples are tailored towards the Windows platforms. You will get more out of the tutorial if you download the free trial version of IBM DB2 9 to work along with this tutorial.

1 of 11 | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management, XML
ArticleID=149565
TutorialTitle=DB2 9 Fundamentals exam 730 prep, Part 7: Introducing XQuery
publish-date=07242006
author1-email=saracco@us.ibm.com
author1-email-cc=