Product Documentation

VCL/CLX Developers Guide

Previous Topic

Next Topic

Table Create Modes

The table below lists the table create modes that are to be used with the ctdbCreateTable() function, and are returned by the ctdbGetTableCreateMode() function.

  • If you wish to use transaction processing (the ctdbBegin(), ctdbCommit(), and ctdbAbort() functions) to ensure atomicity, it is important to create the table using the CTCREATE_PREIMG or the CTCREATE_TRNLOG mode.
  • If you think your table might get big (larger than 2 gigabytes), be sure to use CTCREATE_HUGEFILE.
  • Note that some of the modes listed below can be OR’ed together.

c-treeDB Table
Create Mode

c-treeDB .NET
Table Create Mode


Explanation

CTCREATE_NORMAL

NORMAL_CREATE

Normal table creation. Use this mode when no other create mode apply.

CTCREATE_INSERTONLY

INSERTONLY_CREATE

This mode creates an "integration table" with only input and read privileges. Integration tables are used for audit trails because updates and deletions are not allowed.

CTCREATE_PREIMG

PREIMG_CREATE

This mode implements transaction processing for a table but does not support automatic file recovery. Files with CTCREATE_PREIMG mode do not take any space in the system transaction logs.

CTCREATE_TRNLOG

TRNLOG_CREATE

With this mode you will get the full benefit of transaction processing, including both atomicity and automatic recovery. If you are not sure of what mode to use, and you do want to use transaction processing, then use this mode.

CTCREATE_WRITETHRU

WRITETHRU_CREATE

This mode forces the operating system to flush all disk cache buffers when a data write occurs. Setting this mode can slow performance of the file handler. On the other hand, it is an important feature to use if you want to ensure that all data writes are put to the disk immediately. It is particularly important if you are in an operating environment where the system crashes a lot, and you are not using transactions. However, this mode does not guarantee that operating system buffers will be flushed as expected.

CTCREATE_CHECKLOCK

CHECKLOCK_CREATE

Tables created with this mode requires a record lock before a record can be updated. If a lock is not obtained, the error code DADV_ERR is returned.

CTCREATE_NORECBYT

NORECBYT_CREATE

Create the table without the RECBYT index.

CTCREATE_NOROWID

NOROWID_CREATE

Create the table without the ROWID index.

CTCREATE_CHECKREAD

CHECKREAD_CREATE

Tables create with this mode requires a record lock as records are read. Obtain at least a read lock on a record before it can be read, otherwise the function will return error code DADV_ERR.

CTCREATE_HUGEFILE

HUGEFILE_CREATE

Create the table with huge file support. With this mode on, tables will support 8-byte addresses for file offsets.

CTCREATE_NODELFLD

NODELFLD_CREATE

This mode indicates that the table is to be created without the $DELFLD$ field support.

CTCREATE_NONULFLD

NONULFLD_CREATE

This mode indicates that the table is to be created without the $NULFLD$ field support.

CTCREATE_COMPRESS

COMPRESS_CREATE

Creates tables with data compression support. When this mode is used, c-treeDB automatically creates the file as variable-length.

CTCREATE_FLEXREC

CREATE_FLEXREC

In V11.5 and later: Create the table with Hot Alter Table support.

TOCIndex