简体   繁体   English

以XML形式公开DB2数据/通过XML查询DB2

[英]Expose DB2 data as XML / Query DB2via XML

I have a client who has a sort of data warehouse stored in DB2. 我有一个在DB2中存储了某种数据仓库的客户。 For a variety of reasons, the data must remain on this platform. 由于各种原因,数据必须保留在此平台上。

The client is considering implementing an open-source CMS (Drupal) which runs in MySQL. 客户正在考虑实现一个在MySQL中运行的开源CMS(Drupal)。 The client needs to be able to execute a bunch of pre-defined queries against the DB2 database from the remote application. 客户端需要能够从远程应用程序对DB2数据库执行一堆预定义的查询。

Drupal appears to interact well with XML data from other systems. Drupal似乎可以与来自其他系统的XML数据很好地交互。 It was suggested that we use something like XML-RPC to execute the queries against DB2. 建议我们使用XML-RPC之类的东西对DB2执行查询。

I am very familiar with SQL Server and pretty familiar with MySQL, but I have no experience with DB2 and no understanding of its capabilities or limitations. 我对SQL Server非常熟悉,对MySQL非常熟悉,但是我对DB2没有任何经验,也对DB2的功能或局限性不了解。

Is there any way that we can use something like XML, XML-RPC, or even http to initiate queries against a DB2 database? 有什么方法可以使用XML,XML-RPC甚至http之类的东西来发起针对DB2数据库的查询?

Any ideas are appreciated! 任何想法表示赞赏!

Thank you! 谢谢!

Producing and consuming XML in DB2 is very easy. 在DB2中生产和使用XML非常容易。 DB2's pureXML implementation of the SQL/XML, XPath and XQuery standards is one of the most complete in the marketplace. DB2的SQL / XML,XPath和XQuery标准的pureXML实现是市场上最完整的实现之一。

Creating stored procedures to produce the XML would be my recommendation. 我建议创建存储过程以生成XML。

I'd suggest the following book as an excellent guide - 我建议以下本书作为出色的指南-

http://www.ibmpressbooks.com/bookstore/product.asp?isbn=0138150478&S_TACT=105AGX01&S_CMP=TILE&ca=dti-ibmpresspurexmlcook&ca=dth-i http://www.ibmpressbooks.com/bookstore/product.asp?isbn=0138150478&S_TACT=105AGX01&S_CMP=TILE&ca=dti-ibmpresspurexmlcook&ca=dth-i

If you need any help then don't hesitate to drop me a line. 如果您需要任何帮助,请随时与我联系。

Yes, check out the Services module. 是的,请检出“服务”模块。 It will assist you there. 它将为您提供帮助。 You can also implement xmlrpc without it, but it has some nice features. 您也可以不使用它来实现xmlrpc,但是它具有一些不错的功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM