Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Data model description available

  • rzimmermann1
  • rzimmermann1's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 1 month ago #165200 by rzimmermann1
Data model description available was created by rzimmermann1
Hi,

I will create some reporting based on the answers of a survey.

Question: Is some documentation of the limesurvey data model available. Basically I need to know in which tables I find the provided answers.

Thank you for your support.
Roland
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 1 month ago #165218 by Joffm
Replied by Joffm on topic Data model description available
Hi, Roland,
I suppose you had a look at the database structure before by phpMyAdmin or another tool.

Main tables for reportings can be: (here I use "ls" as prefix)

ls_answers:

Here you find all answer options and subquestions by questionID.

ls_questions:

questions and subquestions by questionID (parentID is the questionID, if there are subquestions (arrays, etc)

ls_survey_[surveyID]

This is the only table I use for reporting.
All answers, columns in SQGA with added subquestion codes in arrays.
Here:
928932X183X20282:
surveyID: 928932
groupID: 183
questionID: 20282

928932X183X20283SQ001
subquestioncode: SQ001 (arrays)

928932X183X20284SQ001_SQ003
subquestioncode x-axis: SQ001 (arrays(number)
subquestioncode y-axis: SQ003


Always the best: create a small survey, enter well defined data and analyse this table.

All the best
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • rzimmermann1
  • rzimmermann1's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 1 month ago #165225 by rzimmermann1
Replied by rzimmermann1 on topic Data model description available
Hi Joffm,

yes, I took a look at the tables before (phpadmin).

And thank you very much. This helps a lot. I go into details of my survey now with your information.

:-)

Roland
The topic has been locked.
  • rzimmermann1
  • rzimmermann1's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 1 month ago #165232 by rzimmermann1
Replied by rzimmermann1 on topic Data model description available
Hi Joffm,

now I checked in detail. I have one remaining problem:

I do not know how to join ls_survey_[xxx] to the structure tables of limesurvey (ls_questions, ...)? A join is not possible because of the way ls_survey_[xxx] is structured.

The only idea that I have is to create my own table with columns for surveyID, groupID, etc. and to fill it with the prepared data from ls_survey_[xxx].

Do you have a better idea? / how do you do your reporting?

Regards,
Roland
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 1 month ago #165244 by Joffm
Replied by Joffm on topic Data model description available
In my opinion you could use something like

join a substring of the column of ls_survey with the qid of ls_questions.

But to be honest, I only use the ls_survey.
The texts of ls_answers and ls_questions also contain all the javascript, the css, the EM stuff which may be included.
So in my php I include my own texts.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: rzimmermann1
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose