The perusal and treatment of surveys
constitute part of the activities carried out by the sociologists. We
are interested, in this example, with the design of an automated system
allowing to handle surveys and to produce "classic" statistical results
in this field : frequency distribution, bivariate frequency table,
various countings... The source data, used for this example, are
extracted from a survey realized in 1993-1994 on 258 students in first
year of DEUG (an ordinary degree diploma) of sociology . The survey was
composed of 55 questions.
The system to be developed will have in
particular to take into account :
- the representation and the storage of
quantitative and qualitative variables
- the representation storage and treatment of questions with multiple
answers
- the checking of the number of theoretical answers ( possible values)
and authorized (one or more) for each question.
Data
dictionary
Mnemonic
Wording
Age
Age of the individual (in whole
years)
Cdrep
Code of the answer of an individual
to a given question
Fratrie
Number of brothers and sisters for
a given individual
Lbquest
Wording of the question
Lbreponse
Wording of the numeric code
representing the answer of an individual to a question
Lbsexe
Wording of the sex of the
individual : Male or Female
Nbrep_aut
Number of answers authorized for a
given question
Nbrep_th
Number of theoretical answers for a
given question
Numchoix
Number of the choice of the
individual in the case of multiple answers (always 1 if the question is
with single answer)
Numind
Number of the individual
Numquest
Number of the question
Sexe
Code sex of the individual (1 or 2)
TypeQ
Type of the question (Q:
Qualitative, N: Quantitative)
Diagram of data
For a further information on the different
stages for building the diagram of data refer, in these pages, at the topic DB Design.
The two last connections of the preceding
table (m-m) are not, like the other connections, integrity constraints,
but specify simply which attributes of joint will have to be used to
link tables REPONSE and LIBELLE_REPONSE.
6-Diagram of data
The "optimal" data structure is the
following one (keys are in bold type):
Queries
By simplification, the database used in the
following questions is made up only of a subset of the source data.
To visualize the contents of each table of
the database, type :
SELECT * FROM Name_of_the_table;
within a frame containing the button "Execute".
Note to english readers : The
value of a string attribute must be spelled in french. To see the real
content of string attributes, use the command above.
Display what is (on average), the number
of brothers and sisters of an individual according to the profession of
the father of this individual. We shall suppose that the profession of
the father is the question number 3 of the survey. (Answer)
Display the distribution ,by sex and number
of question, for the individuals who did not answer to a question : the
wording of the answer is equal to "Non-Réponse". (Answer)