4.3 Embedded XML Databases

  Previous section   Next section

Whether a database is embedded or client/server is an architectural matter. The query language that it supports, and the data types that it can store, are features of a particular database system. Embedded databases can specialize in storing XML data in the same way that client/server databases do.

In fact, there are reasons to prefer an embedded database system for many XML applications.

The early success of XML has been in connecting legacy applications to one another over the Web. In these cases, a software developer generally needed to write code to import and export data, to convert native-format data in the application to XML format for transmission over the network, and to do the corresponding conversion to native format at the other end. XML provides the common language that enables interoperability between heterogeneous systems.

Services are required within the network and at the edges of the network to facilitate this interoperability. The applications that map legacy data formats to XML, and the servers that transmit it reliably and securely over the network, need database services. Translations of XML documents to a relational or object form can be mitigated by using an XML database, and the cost of interaction with a client/server database can be avoided by using an embedded XML database.

Since the developer is writing new code, and since there is no need for direct access to the XML repository by end users, it makes sense to embed the XML database directly in the application. This simplifies installation and management of the new software, and improves performance.

Even though the main job of the data import and export services is to transform data, developers may also want to store the XML data in its native format. This can be important in applications like financial services or accounting software, where the exact format of a trade order, an invoice, or a purchase order must be preserved. Such systems often need to provide nonrepudiation services, so that a trading partner cannot later claim that he never issued a particular request. Storing the request in the exact format in which it arrived, along with any authenticating information, can prevent fraud.

Converting documents from a legacy format to XML can be very expensive, owing either to the volume of data to be converted or to the cost of fetching it from the legacy system. Because of this, the data conversion software may want to cache the XML version of the data for later reuse. An embedded XML database maintains the cache locally to the process that does the conversion, which dramatically speeds up cache fetches.

XML databases, whether client/server or embedded, offer several advantages over relational or object-oriented systems. These advantages include the ability to operate on XML data natively, a closer match between the application's data model and the database engine, and the optional enforcement of XML schema. An embedded XML database offers several advantages over a client/server product, including improved performance, ease of administration by end users, an installation and management regimen that matches the application's, greater reliability due to fewer components in the deployed system, and a smaller footprint than standalone systems.

As XML becomes a more important piece of the computing infrastructure, new applications that operate on XML data natively will appear. This fact has created enormous interest among database vendors in adding native support for XML to their products. Many XML applications will need the performance and ease of deployment and administration that embedded databases provide.


Top

Part IV: Applications of XML