Product Documentation

c-treeDB API for C# - Developers Guide

Previous Topic

Next Topic

Programming the c-treeDB .NET API

c-treeDB .NET is a high-level, easy-to-use API encapsulating two popular FairCom APIs: ISAM and Low-level. c-treeDB .NET is intended as the new standard for c-tree programming in .NET environments. FairCom eases the developer’s task without removing the flexibility and performance of our original APIs.

The c-treeDB .NET 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.

c-treeDB Relationships

A Session represents a connection between a client and a FairCom DB database engine; no work can be performed before a session becomes active. The session object indicates the c-treeDB .NET 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 FairCom DB 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 enhance 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 a row entry 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.

Note: 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.

In This Chapter

Common Functionality

Working with Sessions

Working with Databases

Working with Tables

Working with Records

Data Types

Data Integrity

Working with Resources

Compatibility

TOCIndex