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 developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

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.
(An IBM developerWorks Professional Author)

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



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

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

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Special offers