The SMS system database stores computer inventory in multiple tables in order to store the data efficiently. However, this efficient design can make it difficult to view the computer inventory directly from other applications.
The inventory for each computer is stored in the MachineDataTable. However, the specific inventory data (such as group names, attribute names, and the values for groups and attributes) is stored in other tables. The MachineDataTable has keyed pointers to these other tables. The SMSVIEW program creates views that resolve these keyed pointers so that you can view the computer inventory easily with other applications. For a table of some common views (and their fields) that can be generated by SMSVIEW, see Views Created by SMSVIEW.
SMSVIEW.EXE is used to read the GroupMap table and to create views that make it easier to use the computer inventory data. A view is created for each group. The view for a group joins the group's common table (COMM), the group's specific table (SPEC), and the MachineDataTable.
The views are created using the following naming convention:
vGrouptablename
where
For example, the view for the Network group with the table names of Network_COMM and Network_SPEC becomes vNetwork.
The views use the MachineDataTable as the driving table and then do outer joins to the COMM and SPEC tables that contain the particular group information (such as network, video, and so on). Outer joins are necessary because some or all group attributes can be in either the SPEC or COMM table. Note that when outer joins are used, you cannot filter on any attribute from the SPEC or COMM tables by using a WHERE clause. When the created view uses an outer join, if you filter out one of the SPEC or COMM entries, the results set will still have a record for the MachineDataTable entry with blank values for the filtered SPEC or COMM entry. If you want to filter on the created views, use the HAVING clause, which works on the results set after the join is completed.