Data Model > Accessing the UNICOM Intelligence Data Model > Working with the Case Data Model > Connecting to the UNICOM Intelligence Data Model > About the MDM DataSource object
 
About the MDM DataSource object
The MDM uses the DataSource object to store details about case data that is associated with an MDM Document (.mdd file). There can be more than one DataSource object in a Document. For example, if you use UNICOM Intelligence Interviewer to collect case data in a relational MR database, and then export the case data to IBM SPSS Statistics and Quantum, the Document would typically have three DataSource objects, one for each case data type and location. However, it is possible to have more than one DataSource object for a particular case data type. Typically, the DataSource object is created and set up by the (the Provider) when the connection is made.
The MDM stores additional information specifically for each DataSource object. This information varies according to the case data type (and hence the CDSC being used to read or write the case data). For example, the MDM stores separate card, column, and punch definitions for each Quantum DSC DataSource object in the Document. Similarly for each DataSource object that relates to data stored in a .sav file, the MDM stores details of the names (called aliases) of the IBM SPSS Statistics variables and the values (called native values) that correspond to the categories.
In UNICOM Intelligence Data Model 2.3, the Provider created a new DataSource object in the MDM Document every time you connected to a new case data file and/or location, even if you had exported to the same data format before. This meant that when you re-exported data to IBM SPSS Statistics, for example, but used a different .sav file name or location, the variable names and category values would not match those used previously. This was because new aliases and native values were created for the new DataSource object rather than reusing the ones used previously and stored for the old DataSource object.
However, you usually want successive exports to the same data format to be as consistent as possible. So in UNICOM Intelligence Data Model 2.4, the behavior was changed and the Provider no longer created a new DataSource object if one already existed for the data type, even if a different location was used. This meant that successive exports would be more consistent and, for example, the same .sav file variable names and category values were used where possible for all exports regardless of the name and location of the .sav file. (Although sometimes differences are inevitable when, for example, variables or categories have been added or deleted.)
If you chose to export to a new location, it was used for the export, but the reference to the previous location remained in the DataSource. If there was more than one DataSource object for the DSC in the MDM Document, the Provider searched for one with the name and location specified for the export. If a match was not found, the Provider used the first DataSource object for that DSC encountered.
This remains the default behavior. However, although it satisfies the majority of cases, sometimes you may not want to reuse the same variable names and category values when exporting data to IBM SPSS Statistics or the same card, column, and punch definitions when exporting data to Quantum. In addition, you may want to change the DataSource object to store the new case data location rather than retaining the old case data location. To accommodate these and other scenarios, a new custom Connection properties was introduced in UNICOM Intelligence Data Model 2.6. The property is called MR Init MDM DataSource Use and you can set it in the connection string or using a list on the Data Link Properties: Advanced tab in the Data Link Properties dialog box.
Setting the MR Init MDM DataSource Use connection property
The setting of the MR Init MDM DataSource Use connection property determines what action the Provider should take when it cannot find a matching DataSource object in the Document; that is a DataSource object for the same case data type and with exactly the same location.
0
This is the default. Use the first DataSource object of the same type that is encountered, but do not store the new case data location in it. If there is no DataSource object of the same type in the Document, a new DataSource object will be created. This is the same as how it worked in UNICOM Intelligence Data Model 2.4 and 2.5.
1
Use the first DataSource object of the same type that is encountered and store the new case data location and project name in it. If there is no DataSource object of the same type in the Document, a new DataSource object will be created.
2
Create a new DataSource object. This is how it worked in UNICOM Intelligence Data Model 2.3 and is useful when you do not want to use the same variable names when exporting to IBM SPSS Statistics .sav as used previously.
3
Raise an error so that the connection fails.
See also
Accessing case data from third party applications
Connecting to case data with and without metadata