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.
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. For 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.
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 file structure could be as follows (though not all fields are defined for this example):
11010011122122 ⮨ (household with 3 persons)
2101001120109196138
2101001212105196732
2101001311707199207
11010031211212 ⮨ (vacant household)
11010021111121 ⮨ (household with 2 persons)
2101002110716193069
2101002220812192871
Red text refers to the
record type. In this example,
1 is a household record and
2 is a population record. Blue 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. Black 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.