There are two basic types of data file structures: Those that contain single-record questionnaires, or those that contain multiple-record questionnaires. The following is a brief description of these two types.
• A single record type per questionnaire
In a single-record data file, each line of data from the data file equates to a distinct questionnaire. This means there is no relationship between records in the data file—each record stands on its own and is distinct from another.
One usage for a single-record questionnaire would be a student survey at a university. In this scenario, a single record would be created based on the student. The student identification number could serve as the questionnaire identification. A data file produced from this type of dictionary is known as a flat data file. Example:
00011122122 ÃŸ (first student)
00021122122 ÃŸ (second student)
00031122122 ÃŸ (third student)
blue text refers to the student identification number.
black text describes the individual data items for each specific record.
Notice there is no need to have a record type identifier.
• Multiple record types per questionnaire
In a multiple-record data file, several lines of data (and therefore several records) from the data file equate to one questionnaire. This means there is a relationship between records in the data file—and information identifying them as such in the form of Questionnaire Ids will be needed.
For example, in a typical housing and population census, a questionnaire might consist of the following records:
- one housing record
- multiple (zero or more) population records
For a given questionnaire there would be one or more population records for one household record, dependent on the number of people in the household. However, if you allowed vacant housing units, then those questionnaires would not have any corresponding population record.
A sample (and recommended) file structure could be as follows (not all fields are defined for this example):
11010011122122 ÃŸ (household with 3 persons)
11010031211212 ÃŸ (vacant household)
11010021111121 ÃŸ (household with 2 persons)
In the example above:
text refers to the record type. In our example, 1 is a household record, and 2 is a population record.
text refers to the (Id Items). Note that the numbers are unique for each questionnaire: the 101001 household contains three people whereas the 101002 household contains two people.
text describes the individual data items for each specific record.
A questionnaire designed for an agricultural census might consist of the following records:
- one farm household record
- multiple (one or more) crop records
- multiple (one or more) farm worker records
A questionnaire for a reproductive health survey might consist of the following records:
- one record for data on the woman
- multiple (zero or more) children-ever-born records
- one contraceptive use record
- one immunization record