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]

Finally! Bring native XML data into your relational database using DB2 Express-C

Work with native XML data in DB2 V9.0

Eric Long (elong@us.ibm.com), Software Engineer, IBM
Author photo
Eric Long is a Software Engineer in the IBM Developer Skills Program. Eric graduated from The University of Texas with a degree in Computer Science. He joined IBM in July of 2004 and currently works in Austin, Texas. As a Software Engineer, he provides technical information to developers on open source and industry trends and technologies through speaking engagements, Web content, and faculty consultations at IBM Academic Initiative member universities. His work also includes technical demos and content available at www.ibm.com/university.

Summary:  Learn how to use the new features of DB2® Express-C to store, query, and manipulate native XML documents using SQL/XML and XQuery. Previously, XML documents had to be "shredded," or turned into a CLOB/BLOB/LOB (large object), to be stored in a relational database. This tutorial explains how to handle XML documents natively in the no-cost, open community DB2 Express-C and DB2 Developer Workbench. Learn how to create a new database, create a table with XML and relational columns, populate the table, and query XML data with XQuery.

Date:  06 Aug 2007
Level:  Intermediate PDF:  A4 and Letter (2154 KB | 36 pages)Get Adobe® Reader®

Activity:  8720 views
Comments:  

Before you start

DB2 Express-C is a no-cost version of DB2 Express Edition (also known as DB2 Express) for the community. DB2 Express-C is a data server for use in development and deployment of applications, including XML, C/C++, Java™, .NET, PHP, and more. It can be run on up to two dual-core CPU servers, with up to 4GB of memory, with any storage system setup with no restrictions on database size or any other artificial restrictions.

About this tutorial

If you are a database application developer, application developer, XML developer, or someone curious about new database technology, this tutorial is for you. Learn details about the new XML capabilities of DB2, which is available in the community edition product. If you're tired of either shredding XML data or treating it as a large object (BLOB, CLOB, and so on) to force-fit into a relational database, take this tutorial to explore the advantages of DB2 Express-C.


Objectives

After completing this tutorial, you will know how to:

  • Install and set up DB2 Express-C
  • Use DB2 Developer Control Center to create a new database
  • Create data (both relational and native XML) into the database
  • Use XQuery and SQL/XML to query the XML and relational data with DB2 Developer Workbench

Prerequisites

This tutorials assumes that you have some understanding of XML, SQL, and basic database design. Knowledge of XQuery and SQL/XML functions will be helpful, but are not required.


System requirements

To complete the steps in this tutorial, you need to have DB2 Express-C installed.

1 of 7 | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management
ArticleID=245494
TutorialTitle=Finally! Bring native XML data into your relational database using DB2 Express-C
publish-date=08062007
author1-email=elong@us.ibm.com
author1-email-cc=