Product Documentation

c-treeDB API for C++ - Developers Guide

Previous Topic

Next Topic

Programming with c-treeDB

c-treeDB, short for c-tree DataBase, represents a higher-level, easier-to-use API on top of the two popular FairCom APIs: ISAM and Low-level. c-treeDB is intended as the standard for c-tree programming. c-treeDB makes the developer’s life easier without removing the flexibility and performance of the original APIs.

The c-treeDB general architecture is presented in the figure below, organized into seven different levels: session, database, table, field, index, segment, and record. These levels or layers will be used to present a group of common functionality.

It is important to note that c-tree data and index files can be manipulated directly with or without session or database dictionary support. Please refer to Working with Sessions without Dictionary Support and Creating a Table Object without Database Support for more information.

c-treeDB Relationships

A Session represents a connection between a client and a c-tree Server; no work can be performed before a session becomes active. The session object indicates the c‑treeDB session, the server name and location, the directory where the databases are located, the user name and password.

A Database can be considered as a collection of tables, and each database has its own database dictionary that stores information about each table that belongs to that database: the table name, password and path, the active (open) tables, and the number of tables linked to the database. The database object indicates a database in the session and each session can have multiple databases.

A Table is essentially a c-tree Plus data file and optional index files. There can be, and typically are, more than one table in a database, and a given table may belong to multiple databases. A Table may have zero or more records.

A Field is the basic element of a table, and a collection of fields form a data record.

Often a table will have zero or more Indexes, which enhances the retrieval of records from that table.

Indexes typically have one or more Segments that describe the index key structure. The index object indicates an index associated with a particular table, while the segment links the index with the fields.

A Record is essentially an entry row in a table. A record object indicates a record instance on a particular table. A table may have one or more record objects associated with it. Each record handle may be an independent cursor into the table, or several record objects may share the same cursor into the table.

In This Chapter

Common Functionality

Working with Sessions

Working with Databases

Working with Tables

Working with Records

Data Types

Data Integrity

Working with Resources

Working with Callbacks

Working with Unicode

Compatibility with other c-tree API Technologies

c-treeDB, ISAM, and Low-Level Integration

TOCIndex