Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

Compatibility with other c-tree API Technologies

In This Section

Compatibility with FairCom DB ISAM and Low-Level Data Files

Compatibility with FairCom DB SQL

Previous Topic

Next Topic

Compatibility with FairCom DB ISAM and Low-Level Data Files

The basic requirement for FairCom DB ISAM and low-level data and index files to work with FairCom DB API is that the data file must have a DODA describing the fields and an IFIL describing the data and index structures. The DODA resource must have an entry for every field that forms a data record.

The FairCom DB API interface was designed to work best with ISEG structures with schema segments, that is, each index segment is a field declared in a DODA entry. FairCom DB API works with index segments defined in the ISEG structures using absolute record offsets and arbitrary lengths, that may or may not span more than one field in the record buffer, however, advanced features of FairCom DB API may not work as expected.

ctdbAlterTable(), ctdbSetRecordOn(), and ctdbFindRecord() are typical examples of functions that may not work as expected when dealing with absolute segment offsets.

Another source of problems may come from non-standard usage of c-tree field types declared in the DODA. There have been cases where CT_ARRAY fields being used as variable-length data, CT_STRING fields being used as fixed string fields. Another source of concern are CT_DATE, CT_TIME, and CT_DATETIME fields whose contents will not be compatible with the definitions of date and time used by FairCom DB API.

FairCom DB API was designed from the outset to be as compatible as possible with existing c-tree ISAM and low-level data. However, there are situations where FairCom DB API may not be able to handle very specific data type arrangements used by FairCom DB users in their custom applications.

Previous Topic

Next Topic

Compatibility with FairCom DB SQL

Tables created with FairCom DB API are 100% compatible with FairCom DB SQL, even when tables are created without RECBYT or ROWID indexes. Tables created with FairCom DB API but without transaction processing flags will not be able to participate in SQL transactions or transaction isolation levels.

Tables created by FairCom DB applications must be 100% compatible with FairCom DB API to get the full benefit of all FairCom DB SQL commands and features. FairCom DB SQL makes extensive use of ctdbAlterTable(), ctdbFindRecord() and ctdbRecordSetOn(); any FairCom DB tables that do not support these operations will have reduced compatibility with FairCom DB SQL.

In This Section

Field mapping between FairCom DB SQL, FairCom DB API and FairCom DB API .NET

Previous Topic

Next Topic

Field mapping between FairCom DB SQL, FairCom DB API and FairCom DB API .NET

FairCom DB SQL Field Type

FairCom DB API/FairCom DB API .NET Field Type

BIT

CT_BOOL

TINYINT

CT_TINYINT

SMALLINT

CT_SMALLINT

INTEGER

CT_INTEGER

FLOAT

CT_FLOAT

DOUBLE

CT_DOUBLE

TID

CT_UINTEGER

CHAR

CT_CHARS

VARCHAR

CT_VARCHAR

LVARCHAR

CT_LVARCHAR

BINARY

CT_BINARY

VARBINARY

CT_VARBINARY

LVARBINARY

CT_LVARBIN

DATE

CT_DATE

TIME

CT_TIME

TIMESTAMP

CT_TIMESTAMP

BIGINT

CT_BIGINT

MONEY

CT_CURRENCY

NUMBER, NUMERIC, DECIMAL

CT_NUMBER

 

TOCIndex