Brief introduction
IBM WebSphere Federation Server provides real-time virtual access to the data source. As a result, you can publish new projesources in a shorter time to market. CTS, extends the data warehouse with special queries, and generates a unified view of enterprise data.
Because DB2®9 provides support for PureXML, WebSphere Federation Server 9.1 allows you to integrate relational and XML data from a single database. Federated technology users can now integrate new XML data from the native XML store into the federated database. Although remote XML data types are not currently supported directly, federated users can also implement remote XML data integration through an XML view.
This article shows how to use WebSphere Federation Server 9.1 Set cost and remote XML to store data. Take the bookstore scene for example, let's look at how to use the newly enhanced sql/xml and new XQuery languages to handle local XML storage data. Then, consider the configuration steps needed to integrate remote XML storage data. Later, the bookstore scene is extended to a distributed bookstore scenario, showing how to apply the configuration to a variety of data sources. We have also provided some query examples that allow you to experience the entire process of querying such a system using the Sql/xml and XQuery languages. The concluding Remarks section outlines the various enhancements we are trying to achieve to make this feature easier to use in the future.
Integrating local XML storage data
DB2 supports SQL and XQuery as its primary query language. Both can work on different data models and can be used independently. If the two languages supported by DB2 can be integrated, database applications will benefit a lot from it. Because many applications handle existing relational data and XML concurrently, queries need to combine and correlate both types of data. To support this type of integration, DB2 9 provides the following functions:
Sql/xml functions and predicates that allow an application to access XML data within SQL.
Functions such as db2-fn:sqlquery enable applications to access relational data in XQuery.
Because DB2 provides transparent access to heterogeneous relational data through federation, the relational tables specified in Sql/xml and XQuery may be nicknames.
In this section, we will explore how to use Sql/xml and XQuery to query local XML columns and nicknames. The scenario shown in Figure 1 is used during the discussion.
Figure 1. Bookstore Scene
Figure 2 shows the configuration of this scenario:
Figure 2. The configuration of the bookstore scene