Compound Records

A compound record is a parent record and all of the child records linked to the parent record. For each child table of a parent table, a compound record can have zero or more child records. TIBCO Patterns - Search provides various methods for operating on compound records. Compound records can be retrieved based on the parent key or a cursor on the parent table. Record delete operations can be performed on compound records. All child records for a particular parent key can be retrieved or deleted. In all operations on compound records, the parent table and the set of child tables (to be included in the compound record) can be specified. The set of child tables specified can be any subset of the set of child tables linked to the parent table. The operation is applied only to those child tables. For most commands, the default is to apply the operation to all child tables of the parent table.

Higher level APIs, such as the Java and .NET APIs, provide direct support for compound records. There is an object type that represents a compound record, and methods that return records of this type or explicitly perform operations on compound records. Operations on compound records must perform independent operations on each of the tables involved. The server does not directly support compound operations. The Java and .NET APIs use transactions to ensure any updates are committed or rolled back on all tables as a whole. This is handled within the methods and is not visible to the user. However, be aware that separate operations are being performed. If compound record read and update operations are performed in parallel, it is possible for the read operation to return a partially updated compound record. This is because reads are "dirty" and child tables are updated in separate commands.

The low level "C" API does not have any direct support for compound records. It provides methods for retrieving all child keys linked to a particular parent key or set of parent keys. Given this information, the higher level operations can be implemented.