- Berkeley DB XML Reference Guide:
- Upgrading Berkeley DB XML Applications
|
 
|
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:
- Create a container. Choose a name, and type of container (node storage
vs whole document storage -- a new feature in 2.0).
- Specify indexes. The same indexes from a 1.2.X container will work;
however, 2.0 introduces a number of new options and index types that can
be used.
- 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.
- Load XML document metadata. 2.0 has changed, and extended handling of
metadata, including metadata indexes. 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:
- 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.
- XmlIndexSpecification information can be extracted from a 1.2.X
container.
- XML documents can be dumped to local files, for reloading.
- 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.
Copyright (c) 1996,2007 Oracle. All rights reserved.