SQL Catalog Files
SQLTABLES File
The SQLTABLES file contains one definition item for each SQL table that is accessible on the local account. Each definition item indicates, amongst other things, the Reality data file that corresponds to that table. Each SQL table is based on a single Reality file, although 'translate conversions' can be used in a column definition to extract data from another file on the same database.
Danger of using Q-pointers
If a file in SQLTABLES is actually a Q-pointer, then there is a danger that it might also be defined in another SQL Catalog, for example, in its home account. The two definitions could then easily become out of step (this is true of both traditional Q-pointers and dynamic Q-pointers of the form /account/filename). It may, however, be necessary to use Q-pointers, for example, for applications which place data in more than one account. In this case, precautions should be taken to ensure that the data file is only defined by one SQL catalog. Refer to Multiple Account Catalogs for details.
SQLCOLUMNS File
The SQLCOLUMNS file contains column definition items for all columns in the tables defined in the SQLTABLES file. Each column definition is based on a particular attribute within the associated file (although 'conversions' can be used to combine data from other attributes, and other files, with constants and system data, and to pre-process the data).
Column definitions can be derived, wholly or partly, from existing data definition items within a file's dictionary. However, dictionary and column definitions are not linked, except at the definition stage executed by SQLM.
SQLINDEXES File
The SQLINDEXES file contains index definition items for all SQL indexes associated with the SQL tables defined in the SQLTABLES file. The entries in this file are used to satisfy applications that make enquiries about available indexes. Note that indexes created not using the SQL CREATE-INDEX statement do not appear in the SQLINDEXES file.