The Tables tab, illustrated in s Tab, specifies the Tables used in constructing the Query, and join relationships between them.
The tab is split into a Display area, which shows the existing Table definitions, and a Data Entry Area. The Selection, Columns, and Variables tabs are set up in a similar fashion. To add a table, click the “Insert” button, and then fill out the properties for that entry in the Data Entry Area. Then click “OK” and the entry will be kept in the Display Area.
The form above shows “Device” as the first table to be used in the Query. This is a common choice, because many times we want to know properties about one or more objects within a Device. As will be seen later, the primary Query in an Attributed Compliance Test must start with Device, and Queries for View selection must contain at least one Device entry in their Join list.
Each entry must specify an Alias, which is a name for Objects of the specified type. Above, “device” is the name for objects of type “Device”. An alias is required for each entry in the Join list (i.e. on the Tables tab), in order to distinguish it from other entries in the join list (others of which might also be of type Device.) When a Table is selected from the pull-down menu, a default alias consisting of the table name in all lowercase characters is generated. You may change the default if you like.
The first Table entry is special, and requires only a Table name and Alias. Subsequent entries in the join list require an Expression, and possibly a Navigation entry to indicate how that entry is “connected” (i.e. joined) with previous entries in the table. We will add a second entry to illustrate this.
An AccessList table reference is added. From the Model’s UML diagram, it is clear that a Device contains one or more AccessLists. We can add this entry as illustrated in Adding AccessList table reference.
Give the AccessList entry an alias of “acl”. We want to select AccessLists that are in the device. To do this, under “Expression” enter the alias of the previous entry the new entry is related to, here “device”. If a suitable navigation or navigations exist, they are displayed under the “Navigation” pull-down list. Select the appropriate one. (It is possible, under some conditions, to have more than one Navigation available in the pull-down list, but usually there will just be one selection, indicating a contains or is contained in relationship.)
Similarly, adding AclExtendedRule with an alias of “rule” to the form, where the expression is “acl” (indicating the rules are part of the acl).
Check the “Allow Nulls” check box on the rule entry because you want to display AccessLists that had no rules. The “Allow Nulls” check box includes rows in the result set even if there are no entries in the current table that correspond to entries in the previous table we joined to.
You cannot execute the query until one or more columns are specified to be in the result set. The red error message at the bottom of the editor is informing you of this.