In the context of Rekall, the term query is ambiguous; there are at least two ways it can be used. The most general use is as in an SQL query, ie., something like select a, b from A, B where A.i = B.a. Rekall constructs these internally whenever it needs to retrieve data from a table, or to update data in a table. It is also possible to enter free-text SQL queries to retrieve data.
The second use is Rekall specific, and is the subject of this section. In this usage, a query is an object that contains information about how data it to be retrieved from the server database. Generally, query will be used in this sense, and SQL query otherwise.
Rekall provides a GUI query designer, which allows you to select tables, to specify relationships between the tables, and to specify columns (or, more generally, expressions) which are to be retrieved from the tables. From this information, Rekall constructs an SQL query which is used to actually retrieve data. We will pass over the details of the designer here, and return to it in a later chaper.
A query can be displayed in data view, in which case the SQL query is executed and the data displayed, much as for a table. The screenshot below shows the results of running the OrdersSummary query in the Orders database. Columns which involve explicit relationships between the tables are shown in grey, and cannot be changed; this is so that the user cannot make a change which would alter the combinations of rows returned. Apart from this, values can be updated in the usual way.
In this version of Rekall there are also restrictions on queries in relation to inserting and deleting rows. These are described in the chapter on queries.