MDM Document structure
The MDM Document is a COM object that stores and represents the metadata in a structured way rather than as a serial file. This makes it easy for consumer applications to access the metadata. The following diagram is a simplified representation of an MDM Document, showing some of the main objects.
MDM document showing some of the main objects
Fields collection
This is a heterogeneous collection of objects that define the hierarchical structure of the questionnaire. This collection also defines the schema for the
HDATA hierarchical virtual tables. For more information, see
Hierarchical data in the MDM. This collection can contain objects of the following types:
▪Variable objects. These represent information items and simple questions of different types (single response, multiple response, open-ended, numeric, and so on). The Variable object has an Elements collection, which provides a structured (tree) view of its Element objects, each of which represents a category or analysis element, such as a base or subtotal. The Variable object also has a Categories collection, which is a flat list of all of the Element objects that are categories. These represent the possible answers to a categorical question. In addition, the HelperFields collection defines associated Variable objects that store supplementary information.
▪Array objects. These represent loops, grids, and levels. The Array object defines a question or set of questions that are to be asked more than once. The Array object corresponds to the mrScriptMetadata Loop.
▪Grid objects. These represent a grid question. A Grid object can be considered a special case of the Array object.
▪Compound objects. These group categorical and grid questions that share a category list, typically for presentation in a paper questionnaire.
▪Class objects. These are used to group questions. The Class object corresponds to the mrScriptMetadata Block.
Variables collection
A collection of
VariableInstance objects that define the schema for the top-level virtual table, which is called
VDATA. For more information, see
MDM integration. VariableInstance objects map a Variable object to its associated columns in the case data virtual tables. Each column in the virtual table is represented by one VariableInstance object. For example, a categorical question that has one Other Specify category, would typically have three VariableInstance objects. The first represents the column that holds the responses to the category list, the second represents the helper field that stores the open-ended responses, and the third represents the helper field that stores the coded responses. Within the VariableInstance objects are
ElementInstance objects, which map the categories to their values in the case data.
Types collection
A list of template objects in the Document. These objects can be reused; for example, when you want to ask the same question under different circumstances, or use a list of categories more than once.
CategoryMap
The MDM assigns a unique value to each unique category name in the MDM Document. The unique values are called mapped category values (sometimes shortened to mapped values). Category names must be unique within a question, but the same category name can be used in different questions. For example, categories called Yes and No can be used in several questions, and will have the same mapped value in each one. The CategoryMap object is a flat list of all of the category name and value pairs in the Document.
DataSources collection
A collection of DataSource objects, which are used to hold details about case data that is associated with the Document. There can be more than one DataSource object for a Document. For example, if you use UNICOM Intelligence Reporter to collect case data in a relational MR database, and then export the case data to IBM SPSS Statistics, XML, and Quantum, the Document would typically have four DataSource objects, one for each case data type and location.
One way to understand the structure of the MDM is to open a Metadata Document (.
mdd) file in the Metadata Model Explorer sample application. This displays the objects in the MDM Document in a tree view. Click an object in the tree control to see its type and properties. For more information, see
MDM Explorer.
See also