Server User Guides > Survey Tabulation > Overview of UNICOM Intelligence Reporter - Survey Tabulation > UNICOM Intelligence Reporter - Survey Tabulation architecture > Table population sequence
 
Table population sequence
The following diagram shows the interaction between the table object model and the other main components when tables are populated. In UNICOM Intelligence Reporter - Survey Tabulation, these components are on the server; in UNICOM Intelligence Reporter, they are on the client. All interaction with these components takes place through the table object model and, in normal circumstances, you do not access these components directly.
Table aggregator (coaggr2.dll)
The table aggregator performs a pass through the case data to extract the raw numeric counts that are required for the tables being populated. It also calculates some intermediate values from the extracted data, such as the sum of the squared weights for use in statistical tests, and performs some calculations on the extracted data, such as the calculation of percentiles. As input the table aggregator takes a reference to an MDM document and an aggregation request XML file, which is generated by the table object model. The output of the table aggregator is a raw binary file, which is passed to the table builder.
Table builder (tbcom2.dll)
The table builder reads the raw binary file (generated by the table aggregator) and a table structure XML file (generated by the table object model), and then performs post-aggregation numerical processing on the data.
For example, the table builder calculates any percentages, summary statistics (for example, mean and standard deviation), and statistical tests that have been requested. The table builder formats the results and passes them to the table object model in the form of a results XML file, which contains cell values plus some additional information about the tables. If any statistical tests have been performed, the table builder also outputs raw information from the statistical tests.
UNICOM Intelligence Data Model
The UNICOM Intelligence Data Model handles all communication with the case data and metadata.
When an instance of a table object model document is created, instances of the table aggregator and table builder are automatically created. Each instance of a table object model document has its own instance of the table aggregator and table builder.
Sequence of events when the Populate method is called
1 The table object model writes two temporary files, one containing the aggregation request XML and the other containing the table structure XML. This information is created by the table object model as follows:
The regular tables XML is created in memory, but only for the tables that are to be populated. At this point, any derived variables that are required are also created and are referenced by the Variable attribute instead of the original MDM variable.
The global table settings are merged into the XML for each separate table.
Any statistical tests that are invalid for their table are discarded.
Unique dimension IDs are assigned to each axis and cell item across all tables.
Filter variables are created in the MDM Document as required and the variable names are inserted into the tables XML.
Two different XSLTs are applied to the post-processed tables XML (which is still in-memory only). One XSLT produces the aggregation request XML and the other produces the table structure XML. These two XML files are written to disk with temporary file names.
2 The table aggregator object is given a reference to the MDM document, the name of the aggregation request XML file, and the name of the file to write the results into. The table aggregator processes the case data and writes the results into the specified output file (sometimes called the nums file).
3 The table builder is given the names of the table structure XML and nums files as input and the names of the results XML and statistics data files to use for output. The table builder performs some post-processing on the raw numbers produced by the table aggregator to create the final numbers that are to appear in the table. These are written into the specified results XML file. If any statistical tests were requested, additional information about these tests is written into the specified statistics data file.
4 The table object model loads the results (cell values and heading IDs) from the results XML file generated by the table builder.
5 If the Document.KeepLogFiles property has been set to True, all the temporary files are given meaningful file names, otherwise all temporary files are deleted. In a multiuser environment, the Document.LogFilePath should be set to a unique value for each user to stop the files for each user getting mixed up.
See also
UNICOM Intelligence Reporter - Survey Tabulation architecture
Internal files used by the table object model
XML formats used by the table object model
UNICOM Intelligence Data Model
Table scripting
UNICOM Intelligence Reporter - Survey Tabulation architecture