Chapter 1. Overview

Table of Contents

Basic Concepts
Running the Shell
Getting Help

Welcome to Berkeley DB XML (BDB XML), an embeddable XML database engine that provides support for XQuery access. This document will introduce you to BDB XML's feature set. After reading this document you should have a good understanding of what BDB XML can do for you and how it might be used to manage XML data within your systems and applications. Follow along with the examples and try out BDB XML on your system.

Basic Concepts

Typically, BDB XML is used as a library that is linked directly into your application. In addition, BDB XML has a command line shell that allows you to work with XML documents outside of the programming languages that you normally use to interact with BDB XML. You can use the command line shell as part of your application, as a management tool, or simply as a means to explore the features of the product as we do here.

In BDB XML, all XML data is stored within files called containers. The BDB XML shell provides a simple and convenient way to work with these containers and exposes most of the BDB XML functionality in a friendly, interactive environment, without requiring the use of a programming language.

Containers are really a collection of XML documents and information about those documents. For example, containers include any indices that are being maintained for the documents.

Containers also store XML documents as either whole documents or as nodes. When containers store whole documents, the XML document is stored all as one unit in the container exactly as it appeared on the filesystem. When documents are stored as nodes, the XML document is deconstructed into the smallest pieces – that is, nodes – possible, and those small chunks are what is stored in the container.

For the node storage case, retrieval of the document still returns the document in the same formatting state (assuming you didn't modify it) as it was in when it was stored in the container. The only difference is how the document is physically held within the container. Note that node storage typically offers better performance than does whole document storage, and for this reason node storage is the default container type.