Queries obtain their source data from a set of tables. These tables provide data from actual database tables in a form that is convenient for analysis.
All the tables that can be accessed using the query language can be divided into two large groups: actual tables and virtual tables (fig. 13.1).
Fig. 13.1. Query tables
You can view the assortment of tables that can be accessed using queries along with their descriptions in the Syntax Assistant, in section Working with queries / Query tables.
Each actual table contains data from a single database table.
For example, the Catalog.Customers actual table corresponds to the Customers catalog, while the AccumulationRegister.BalanceOfMaterials table corresponds to the BalanceOfMaterials accumulation register.
Virtual tables are usually generated based on data available in multiple database tables. For example, AccumulationRegister.BalanceOfMaterials.BalanceAndTurnovers is a virtual table that is generated based on multiple tables of the BalanceOfMaterials register.
In some cases virtual tables can be generated based on a single actual table (for example, the Prices.SliceLast virtual table is generated based on the Prices information register table).
However, all the virtual tables share one common feature: they can be assigned a number of parameters that define which data is included in these tables. The assortment of parameters may vary for different virtual tables, it is defined by the data stored in the source database tables.
There are two actual table types: object (referential) and nonobject (nonreferential). Object (referential) tables store data of referential types: catalogs, documents, charts of characteristic types, and so on. Nonobject (nonreferential) tables store all the other data types: constants, registers, and so on.
The distinctive feature of object (referential) tables is the fact that they contain the Ref field, which is linked to the current record. You can obtain user object presentations from such tables as well. These tables can be hierarchical and their fields can include nested tables (tabular sections).