DataDirect XQuery for MySQL Examples

Users with MySQL database deployments (Enterprise version) can now take advantage of all the benefits of DataDirect's XQuery engine. DataDirect XQuery provides high-performance, scalable, reliable XQuery for MySQL users. Additionally, DataDirect XQuery provides integration capability with MySQL, other relational databases, and EDI.


Examples – Table of Contents

The following examples show you how you can use DataDirect XQuery to work with data in a MySQL relational database. Consider the following scenario: Your company receives book orders from a variety of partner companies; when an order is received, an XML document consistent with a "canonical" internal XML Schema (structure) must be created so that it can be sent to the warehouse to fulfill the order. Orders are usually submitted in a proprietary XML format; but in some cases orders are not even in XML format; nor is the information contained in these orders a subset of what the "canonical" internal format requires. Once fulfilled, orders also need to be archived in the company’s main database for archiving/reporting purposes. Your company relies on a MySQL database to store information about all the books in inventory, and to keep track of the orders.

As you'll see, XQuery, and in particular the DataDirect XQuery implementation, provide a great way to solve this and similar problems.

  1. Processing XML using MySQL and DataDirect XQuery
    Learn how to use DataDirect XQuery to merge data contained inside XML documents and a live MySQL database table, and how to format a resulting XML document in a way that is consistent with a specific XML Schema.
  2. Processing EDI as XML using MySQL and DataDirect XQuery
    This example covers integrating an EANCOM message, a common EDI data format with the relational data contained inside a MySQL database table, then formatting the results in a XML format, all using DataDirect XQuery.
  3. Archiving XML in MySQL using DataDirect XQuery
    The final example shows how to process an incoming XML or EDI message with data contained in a MySQL database, and how to save the resulting data back into the MySQL database table using DataDirect XQuery's advanced support for database inserts and updates.

XML Blog!

XML Connections is DataDirect's new and improved blog. On it you'll find the latest news and information for XQuery, XQJ, XML Integration, XML Converters, and more.

Visit the XML Blog today!

To learn more, click here.

Try DataDirect XQuery® Free!

Put the power, scalability, and performance of DataDirect XQuery® to work for you today! Our free trial lets you see for yourself how easy it is to build data integration applications that access relational, EDI, and other file formats as XML!

Download DataDirect XQuery® today!