All the databases within Match-IT are accessible from scripts. You have the same access to the databases from within scripts as Match-IT itself has. BE WARNED! It is possible to do great damage if your scripts do not work correctly.
All database files are identified by a file number. The first is number 1. You do not need to know these numbers as each has a mnemonic that is easy to remember. The mnemonics are constant and never change, whereas the file numbers themselves may change if a new database is added to the system. All these mnemonics can be found in the reference section. All file mnemonics consist of the three letters you see on the front of each line in the file list.
In any function that requires a file number as a parameter, it can supplied by just quoting its mnemonic, e.g. m.mch for the material catalogue.
For each database, each of its fields has a number allocated to it for reference purposes. Like file numbers, these all have a mnemonic. All the mnemonics for the fields of any file can be found in the reference section. A list of all field mnemonics is available. In the help topic they are shown as tla:name (i.e. the file mnemonic, a colon, then the field name). In scripts the colon is dropped. E.g. m.mchBuyable is referring to the Buyable field in the mch database. There is an extra field that can be accessed from scripts that is not in the on-line help, that is RecNo. This represents the internally allocated record number. This can only be read, you cannot assign to it.
In most cases, fields are referenced directly by their name (see Accessing fields in files) without the need for these mnemonics. A few functions require the field to be referenced by its number (e.g. m.set()), use these mnemonics for those cases.
For each database, each of its keys (aka indexes) has a number allocated to it for reference purposes. These also have mnemonics, they too can be found in the reference section. All key mnemonics are of the form tla:Field1Field2…FieldNKey, where tla is the file mnemonic and Field1…FieldN are the names of the fields that compose the key in their order of significance. The word Key always appears as a suffix. This distinguishes them from field mnemonics. As with field numbers, the colon is dropped in scripts. E.g. m.mchStepMaterialKey is referring to the mch key that is composed of the Step field and the Material field.