Databases Reference
In-Depth Information
DB2 9 query engine processes XQueries natively. We cover more details
regarding XQuery in future chapters.
With native XML capabilities added to DB2 9, IBM has enhanced development
tools for use with DB2 9. One of the key development tools is DB2 Developer
Workbench, which utilizes XML Query Language (XQuery) to query the XML
data type.
You can use Visual Builder to piece together queries, then review the DB2
Developer Workbench generated syntax.
The following walkthrough demonstrates the use of Visual Builder for the XQuery
in DB2 Developer Workbench, which queries the name and city of the customer
who has the city element defined with the data Toronto:
1. First launch DB2 Developer Workbench.
2. Establish a database connection.
In the Workspace panel, enter the workspace directory. The workspace is the
Eclipse platform component that holds the development environment.
Select the Database Explorer tab in the workspace view (Figure 1-19 on
page 34). Expand the Connections folder. This should show SAMPLE[DB
Alias]. Right-click SAMPLE[DB Alias] then select Reconnect . The User ID
and password prompt window appears. Upon successful connect, the status
in the Properties should change from <Disconnected Connection>SAMPLE to
<Live Connection> SAMPLE [DB2 UDB V9.1] .
Search WWH ::




Custom Search