MultiRecordTable, MRTTable, support is the first implementation of a Virtual Table. This is a type of table in which the record structure varies from record to record depending on some criteria. This implementation requires that within a given record schema there is a rule identifying if a record can be properly represented with that record schema or not. This support requires common schema to be defined for all records (however, this may describe only the first part of the record) and a filter identifying records belonging to a particular record schema based on this common schema.
The actual table which contains all data records is required to have a standard c-treeACE DODA and IFIL resource (or provided through external callbacks). This table is called the host or parent. The c-treeDB API provides the means to add definitions for the various record type schemas by defining an MRTTable per each record type as a Virtual Table for the host table.
The c-treeDB ctdbCreateMRTTTable() function behaves much like the ordinary ctdbCreateTable() function, however, it creates a MRTTable definition.
ctdbIsVTable(CTHANDLE table) can be used to check if a table is a Virtual Table or a regular table.