Logo Bases de données
Français     English

Applications of Databases to Humanities and Social Sciences

Sociology
Questions, comments, suggestions?


Sociology

Problem

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.

1-Simple FDs

Individu -> Sexe, Age, Fratrie, Lbsexe
Sexe -> Lbsexe
Numquest -> Lbquest, Nbrep_th, Nbrep_aut, TypeQ

2-Not classified attributes and compound FDs

The attributes Cdrep, Lbreponse and Numchoix were not classified in the preceding stage, they intervene in compound FDs which are the following ones :

Numquest, Numchoix, Numind -> Cdrep, Sexe, Age, Fratrie, Lbsexe, Lbquest, Nbrep_th, Nbrep_aut, TypeQ
Numquest, Cdrep -> Lbreponse, Lbquest, Nbrep_th, Nbrep_aut, TypeQ

3-Elimination of transitivities

Individu -> Sexe, Age, Fratrie
Sexe -> Lbsexe
Numquest -> Lbquest, Nbrep_th, Nbrep_aut, TypeQ
Numquest, Numchoix, Numind -> Cdrep
Numquest, Cdrep -> Lbreponse

4-Construction of the entities and associations

ECHANTILLON(Numind, Sexe, Age, Fratrie)
LIBELLE_SEXE(Sexe, Lbsexe)
QUESTION(Numquest, Lbquest, Nbrep_th, Nbrep_aut, TypeQ)
REPONSE(Numquest, Numchoix, Numind, Cdrep)
LIBELLE_REPONSE(Numquest, Cdrep, Lbreponse)

5-Linking of the entities and associations

Source entity
Goal entity
Relation on attribute
Type of relation
ECHANTILLON
LIBELLE_SEXE
Sexe
1-m
ECHANTILLON
REPONSE
Numind
1-m
QUESTION
LIBELLE_REPONSE
Numquest
1-m
QUESTION
REPONSE
Numquest
1-m
REPONSE
LIBELLE_REPONSE
Numquest
m-m
REPONSE
LIBELLE_REPONSE
Cdrep
m-m

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.

Question 1

Display the number of individuals having answered, in the same survey : 1 at the question 1 , 2 at the question 2 and 3 at the question 3.(Answer)

Question 2

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)

Question 3

Make a frequency distribution on the question number 2, divided up by sex of the individuals. (Answer)

Question 4

Make a bivariate frequency table between questions number 2 and 4. (Answer)

Question 5

Display the distribution, by sex and age, of the population. (Answer)

Question 6

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)



©Marc Grange, February 2001 | Last update: February 5, 2013