Prev  Next  Up  Contents

The CBT Library

Remember that a database consists of two files: a data file and an index file. The ISAM library manages the data file directly, and indirectly manages the index file through the use of the CBT library. Like the ISAM library, the CBT library is a C function library.

The speed at which a record can be found in a large data file is dependent on how fast a key can be found in the index file. The CBT library organizes the index keys into a tree structure known as a B+tree (pronounced bee-plus-tree). The B+tree algorithm is very efficient at randomly locating a particular key in the index file, and also at processing the keys sequentially.

The use of the CBT library is completely transparent when you are using the ISAM library (except that the CBT library must also be linked to your program). In some cases, you may want to manage your data files yourself, rather than using the ISAM library. In such cases, you can take over the management of the data files and use the CBT library directly to handle the more complex task of managing the index files.

Next Page
C/Database Toolchest Description
Product List