Scalable Database Server, HiRDB Version 8 Description

[Contents][Glossary][Index][Back][Next]

2.2.2 Linkage to HiRDB Adapter for XML

Linking to HiRDB Adapter for XML allows you to use the database mapping facility.

Organization of this subsection
(1) Overview of the database mapping facility
(2) Advantages of the database mapping facility
(3) Other features

(1) Overview of the database mapping facility

XML text consists of tags in a tree structure and sets of character strings enclosed by these tags. In contrast, databases consist of sets of related record data. HiRDB Adapter for XML provides database mapping functionality that maps XML text tags to tables and columns, and converts the character strings embedded in the XML text to appropriate data types. The facility then saves the converted data to a database, and can restore the data it has saved to the database back to the original XML text. The database mapping functionality allows you to perform the following operations:

There are two ways to map XML text to a database: using an API or using a simple command. If you use the API, you can generate SQL code internally to access the database, or you can use the pdload command of the database load utility (pdload).

(2) Advantages of the database mapping facility

The database mapping facility provides the following advantages:

Flexible support for changing XML text and databases
Information such as the XML text structure and table formats is maintained in a definition file independent of the application. This allows you to develop applications that flexibly support changes in the content and structure of the data handled.

An abundance of supported data types
In addition to numeric data and character strings, you can store not only XML text itself in a database, but also image and other data that is referenced from within XML text. You can delete and update the stored data, as well as restore it to its original XML text structure.

Ability to perform a variety of processing with a single definition file
The definition file that is created when you save XML text to a database can be used as a definition file for updating the data and restoring it to the original XML text.

Easy manipulation of data elements
You can create callbacks to be invoked by HiRDB Adapter for XML when mapping is being executed. Through the use of such callbacks, you can perform the following processes on data extracted from XML text:
  • Convert character strings to data of a specific type.
  • Pass multiple data items as parameters to be manipulated as desired.
  • Store data in abstract data type columns.

(3) Other features

In addition to the advantages described in the preceding subsection, the database mapping facility also includes the following features:

Linkage to XML servers
When uCosminexus Interschema - Parsing Kit is used, HiRDB Adapter for XML can link at an object level to DOM and SAX parsers.

Database access
When DABroker for C++ is used, C++ applications can be developed with HiRDB Adapter for XML to access databases. When DABroker for Java (JDBC) is used, Java applications can be developed to access databases as well. The application developer can manage database connection, disconnection, and transaction processing by directly issuing DABroker for C++ or DABroker for Java (JDBC) APIs.