Programmer's Reference
c-treeDB, short for c-tree DataBase, represents a, high-level, easier to use API on top of the c-tree ISAM and Low-level APIs. c-treeDB is intended as the new standard for c-tree programming. FairCom tried to make 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 the "Working with Sessions without Dictionary Support" and "Allocating a table handle without database support" for more information.
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 handle 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 such as the table name, password and path, the active (open) tables, and the number of tables linked to the database. The database handle indicates a database in the session and each session can have multiple databases. A table is essentially a c-tree Plus data, and optionally, 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 forms a data record. Often a table will have zero or more indices, which enhances the retrieval of records from that table. Indices typically have one or more segments describing the index key structure. The index handle 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 handle indicates a record instance on a particular table. A table may have one or more record handles associated with it. Each record handle may be an independent cursor into the table, or several record handles may share the same cursor into the table. |
||||