Persistent storage model when adding a value

To understand how the persistent storage subsystem is organized and the steps it executes when adding a value, see Figure 28.

The overall model of persistent storage consists of four different modules. The programs using the storage subsystem appear at the top of the figure. Your program first creates a new disk dictionary. The act of creating the dictionary results in the modules being created automatically. Once the dictionary is created, all of the member function calls you make deal directly with the dictionary.

Even though the figure shows different modules, for the most part you are not calling them directly. You do need to call modules directly, however, when extending the system,. For more information on extending the system, see "Extending persistent storage" on page 124.

The default index manager supports enumeration of all of the keys in a dictionary, but does not guarantee any specific ordering of the keys. You basically get the first key, then the next, and so on, in random order. Because keys have no defined order, you cannot request a range of keys in one lookup--for example keys greater than 10 and less than 20.

If you had an application in which it was important to specify a range of keys (implying a ranking or ordering of keys), you could implement a sorted index extension to the basic protocol offered by disk dictionaries. See the TSortedIndex example in "Extending persistent storage" on page 124. The TSortedIndex example shows how to enumerate dictionary keys in a particular order and also shows how to extend the persistent storage system in general.

The following actions occur when you add a key-value pair to a dictionary:



[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker