IBM®
Skip to main content
    United States change      Terms of use
 
 
Select a scope:    
     Home      Products      Services & industry solutions      Support & downloads      My account     
alphaWorks  >  XML  >  

IBM XQuery Whiteboard for DB2

A graphical tool that extends the XQuery capabilities in IBM DB2 Version 9.1 for Linux, UNIX, and Windows.


Date Posted: February 13, 2007
Overview Requirements DownloadFAQsForum Reviews

1. What is XQuery?
2. Can I use another version of DB2® 9?
3. Could XQuery Whiteboard perform better?
4. What should I do if I'm having trouble running XQuery Whiteboard?
5. If I only want to operate on local documents or remote documents, do I still need to connect to DB2 9?
6. How can I see attribute results?
7. What is the XQuery Update Facility?


1. What is XQuery?

XQuery is a functional query language that operates on XML documents and fragments. It is analogous to SQL, which is a non-procedural query language that operates on tables.

XQuery 1.0 became a W3C Recommendation on January 23, 2007. It was developed by the XML Query Working Group. Several books about XQuery 1.0 have been published.

Back to top Back to top

2. Can I use another version of DB2® 9?

No. XQuery Whiteboard uses the XMLTABLE XML function that was added to SQL in IBM® DB2, Version 9.1, for Linux®, UNIX®, and Windows®. This XML function had not yet been implemented in other versions of DB2 9.
Back to top Back to top

3. Could XQuery Whiteboard perform better?

Yes. In particular, the use of the table: URI in the fn:doc function causes the creation of an XML document that represents the entire table. In many cases, only a small number of the elements representing the tables columns and rows are actually used. A better approach would be to construct only those columns that are needed and to push some of the XQuery predicates on the constructed document into an inner SQL query.
Back to top Back to top

4. What should I do if I'm having trouble running XQuery Whiteboard?

You might want to increase some of the database configuration parameters. I've been using the following values:
  • APPLHEAPSZ: 4096
  • DBHEAP: 2400
  • STMTHEAP: 8192
  • LOGFILSIZ: 4000
Back to top Back to top

5. If I only want to operate on local documents or remote documents, do I still need to connect to DB2 9?

Yes. XQuery Whiteboard parses and analyzes the XQuery expression that is entered and then generates a SQL statement for DB2 to execute.
Back to top Back to top

6. How can I see attribute results?

You can use the fn:data function in order to see the content of the attributes. Examples are shown in the following XQuery expressions:

doc('column:ANDREW.PURCHASEORDER.PORDER')/*/data(@PoNum)

for $a in doc('column:ANDREW.PURCHASEORDER.PORDER')/*/@PoNum
return data($a)

Back to top Back to top

7. What is the XQuery Update Facility?

The XQuery Update Facility is an extension of XQuery 1.0. It adds four updating expressions: delete, insert, rename, and replace. It adds one non-updating expression: the transform expression. XQuery Whiteboard 1.1 and DB2 9.5 both support the transform expression. The updating expressions can be used in the modify clause of the transform expression.

XQuery Update Facility 1.0 became a W3C "Last Call Working Draft" on August 28, 2007. It was developed by the XML Query Working Group (WG).


Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
IBM and DB2 are trademarks of IBM Corporation in the United States, other countries, or both.
Other company, product, or service names may be trademarks or service marks of others.

Back to top Back to top
View screenshots:
An XQuery expression that uses the EMPLOYEE table has been evaluated.

Download now Download now

Related technologies

For platform(s):
Multi-Platform

For topics:
analysis, Databases and data management, JDBC, linux, SQL (Structured Query Language), Unix, XML, XQuery


 

    About IBM Privacy Contact