Berkeley DB XML Reference Guide:
Berkeley DB XML

PrevRefNext

Architecture

Berkeley DB XML is implemented as C++ library on top of Berkeley DB. BDB XML is distributed as a shared library that is embedded into the client application. The BDB XML library exposes API's that enable C++ and Java applications to interact with the XML data containers. Figure 1 illustrates the Berkeley DB XML system architecture.

xml_fig_1

BDB XML uses Berkeley DB for data storage and transaction management. Client applications can also store data directly to a Berkeley DB database. Although BDB XML is implemented as a layer on top of Berkeley DB, some understanding of the underlying Berkeley DB API is required, as some BDB XML API methods accept Berkeley DB object handles as parameters.

The BDB XML library consists of three main components: a Document Storage Manager, an XML Indexer, and a Query Processing Engine.

Document Storage

Within Berkeley DB XML, documents are stored in containers. Each container has a name, document store, data dictionary, and sets of indices and system-maintained statistics. The client application can operate on multiple containers concurrently, and controls the placement of documents within containers. The client application can also store data to Berkeley DB databases. A client application can perform the following actions against a container:

Action
Declare an index against the container.
Open the container for use within the application.
Insert a document into the container.
Retrieve a document from the container.
Update and modify a document in the container.
Query the container using an XQuery or XPath expression.
Delete a document from the container.
Close the container.
Rename documents and containers.
Delete documents and containers.
Dump the container to a text file.
Load the container from a text file that was generated by a container dump.
Verify that the container is internally consistent.

For a complete description and examples of how to use the BDB XML API to perform these tasks, see either the C++ or Java version of the Berkeley DB XML Getting Started Guide.


PrevRefNext

Copyright (c) 1996,2007 Oracle. All rights reserved.