Berkeley DB XML Reference Guide:
Upgrading Berkeley DB XML Applications
PrevRefNext

Migrating Berkeley DB XML Data to 2.0

The database format is new in Berkeley DB XML release 2.0, and there is no upgrade utility at this time. If it is not possible to reload data from external files, it is possible to write a small, custom application to dump 1.2.X data, and load it into 2.0. The Berkeley DB XML dbxml_dump and dbxml_load programs will not work for this purpose.

Information Necessary for Load into 2.0

Migrating data is best thought about in terms of what information is needed to load into 2.0. A load comprises the following operations:

  1. Create a container. Choose a name, and type of container (node storage vs whole document storage -- a new feature in 2.0).

  2. Specify indices. The same indices from a 1.2.X container will work; however, 2.0 introduces a number of new options and index types that can be used.

  3. Load XML documents. 2.0 requires names, and 1.2.X XmlDocument objects have numeric IDs, not names. The numeric IDs can serve as names, or the system can generate unique names, using the DBXML_GEN_NAME flag.

  4. Load XML document metadata. 2.0 has changed, and extended handling of metadata, including metadata indices. Also, in 2.0, metadata is no longer part of the document.
Information to Dump from 1.2.X

The remaining task is thinking about how to dump a 1.2.X container such that the information above is available:

  1. The XmlContainer name and type are an application choice, based on expected usage. If the application performed well with 1.2.X, then using whole document storage may be preferred.

  2. XmlIndexSpecification information can be extracted from a 1.2.X container.

  3. XML documents can be dumped to local files, for reloading.

  4. Obtaining 1.2.X metadata is more difficult. In this case, the application needs to know that the metadata exists, and acquire it and dump it to a format that can be used in the load step.

PrevRefNext

Copyright (c) 1996-2009 Oracle. All rights reserved.