Data Collection Files
A data collection file is a variant of a dynamic file in which the records are data collections, sets of items structured as arbitrarily multi-dimensional name/value pairs. A data collection file is created using CREATE.FILE with the COLLECTION option.
The dictionary part of a data collection file is a standard dynamic file. The only valid use of A/D/S type items in the dictionary is to reference the record id (field 0) because data collections do not have the concept of fields, values or subvalues (though a character string in a collection could be structured in this way). Instead, dictionaries use E-type (element path) items to identify elements of the collection by name. These have the same form as a D-type record except that field 2 holds the element path instead of a field number.
The data part stores records as data collections. Reading a record in a QMBasic program yields a data collection variable. Conversely, only a data collection can be written to these files.
A data collection file may have indices built on data defined by an E-type dictionary record in exactly the same way as those based on D-type items in other files. It is also possible to define a trigger function in a collection file in which case the record data passed in to the trigger function will be a collection instead of a string. Only record level encryption is supported for collection files.
The query processor can access collection files by using E-type dictionary items instead of D-type items. The ELEMENT "name" construct can be used to reference a collection element on the command line.
Collection files are fully supported by QMNet, data replication, transactions and record level encryption.
Records in a data collection file can be viewed and edited using the collection editor, CED.