Product Documentation

SQL Operations Guide

Previous Topic

Next Topic

Overview of the FairCom DB SQL Types SDK

c-treeDB API is a high-level, easy to use API in addition to the traditional c-tree APIs: ISAM and low-level. c-treeDB API is intended as the standard for FairCom DB programming. When compared to ISAM and low-level APIs, c-treeDB API introduced a formal definition on the structure of data and index files, introduced concepts such as ROWID and NULL field support, and more specifically, a formal definition for each field type supported.

Existing application data and index files, i.e. data created prior to the publication of the c-treeDB API API, may have implemented certain field types in a way that may be incompatible with c-treeDB API. Hence, they will be incompatible with FairCom DB SQL as FairCom DB SQL relies upon c-treeDB API functionality. Field types such as CT_DATE, CT_TIME and CT_TIMES are probably the most common examples of existing data that may be incompatible with c-treeDB API.

The c-treeDB API Callback feature was implemented to provide our customers a means to intercept certain c-treeDB API operations and add custom code to manipulate record buffer layouts or change field data on the fly and make the record and field data compatible with c-treeDB API. Please refer to the “c-treeDB API Callback” document for detailed information concerning this new feature.

The c-treeDB API Callback feature was introduced into FairCom DB SQL to allow for easy and transparent translation of customers’ existing ISAM or low-level native data to a data format that is compatible with FairCom DB SQL requirements. This new feature is called FairCom DB SQL Callbacks.

This section describes the utilization of the FairCom DB SQL Callback feature to introduce code to allow existing ISAM data to be used transparently with FairCom DB SQL. When FairCom DB SQL reads data from native ISAM tables, the callback code translates the data record to make every data field compatible with SQL. When FairCom DB SQL writes new data, or updates existing data, the callback code will translate the data in SQL format to comply with the native format used by the ISAM application. The ISAM table will be available for use with FairCom DB SQL, yet remains compatible with existing ISAM applications.

TOCIndex