====== Data in SoSci Survey ======

SoSci Survey saves data in the file system and in a database. The tables further down on this page give an overview as to where which data will be saved.

  * The file system consists of the program itself, the configuration, uploaded files and temporary data. The latter includes cached questions, possibly survey data as well ([[:en:server:caching]]).
  * Users, survey projects (incl. the List of Questions, questionnaires, text elements etc) are saved in the database, as well as collected data.


===== File System =====

The file system consists of program files, the configuration, as well as temporary files. All pathnames are relative to SoSci Survey's installation directory.

^Path^^Description^
|./||There are no requirement files in the root directory of the installation. The //.htaccess// file ensures the //index.html// and //index.php// files will be checked when the directory is called up. //index.html// can be changed as desired or replaced. The //-reach.php// and //-php.php// files are used to check the web server function during installation.|
| admin/ || PHP scripts which can be invoked in the project management directly |
| help/ || Manual for SoSci Survey |
| images/ || Images and other files (e.g. JavaScript, PHP script for diagrams) that are used in the questionnaire |
| inc/ || Classes (PHP scripts) which are used in the project management and/or to display the questionnaire |
| files/<sup>2</sup> || Uploaded and shared files storage |
| -> | protected/ | Protected file storage (files uploaded by users) |
| -> | share/ | Shared files (resources shared by users for other users) |
| -> | upload/ | Files uploaded by respondents |
| layout/ || Images and other files (z.B. JavaScript) for the project management |
| modules/ || Modules used in SoSci Survey (question types and languages etc.) |
| plugins/ || Plugins for SoSci Survey |
| -> | emff/<sup>1</sup> | [[http://emff.sourceforge.net|EMFF]] (Easy Musicplayer For Flash) to display mp3 files in the questionnaire (optional) |
| -> | FAQhere/<sup>1</sup> | [[http://faqhere.sourceforge.net|FAQhere]] to include frequently asked questions (optional) |
| -> | reCaptcha/<sup>1</sup> | [[http://code.google.com/intl/de/apis/recaptcha/docs/php.html|PHP module for reCaptcha]] to use a captcha in the questionnaire (optional) |
| -> | trashmail/<sup>1</sup> | List(s) of email addresses that were blocked during registering (optional) |
| system/<sup>2</sup> || Installation configuration (config.php) and other files that are modified when SoSci Survey is in use |
| -> | archive/ | Archived projects (XML files) |
| -> | cache/ | Project cache files: a cache is created for each project in order to reduce the number of times the database is accessed (these files can easily be deleted) |
| -> | logfiles/ | Log files for program errors, usage statistics, changes to user data etc. |
| -> | session/ | System temporary files that occur when project managers sign in (these files can be deleted, but by doing so all project managers will be logged out) |
| -> | temp/ | User temporary files that occur when questions are uploaded or when files are downloaded (older files can easily be deleted here) |
| templates/ || Templates for layouts and question packets that can be used in SoSci Survey |
| view/<sup>2</sup> || Temporary files that can be used directly in the questionnaire  -- notably CSS spreadsheets, dynamically generated diagrams in the future |
| */ || Every survey project has its own project directory in which images and other project files can be stored, alongside an automatically created //index.php//. The project manager can choose any name and modify it. There is a function in the server maintenance that can recover project directories that have been accidentally deleted (but not deleted images/files), and delete abandoned project directories.|
<sup>1</sup>This directory is only available as an option.\\
<sup>2</sup>This directory will only be created by the installation routine.


===== Database =====

Depending on the set prefix, the dat base tables can be called something else than specified below. Text files in the table are saved in UTF-8 encoding by default.

| faq_*<sup>2</sup> | Plugins FAQhere database tables, if used to display frequently asked questions |
| sosci_activities | Prepared user activities, e.g. email address confirmation or resetting the user password |
| sosci_authorisations | User authorizations for survey projects |
| sosci_click | Visitor counter for survey projects (click for the questionnaire) |
| sosci_contacts | Email addresses collected separately from other data |
| sosci_interviews | Data collected in the questionnaires |
| sosci_items | Items and options for questions |
| sosci_layouts | Questionnaire layouts for projects |
| sosci_membership | Allocation of users to workgroups |
| sosci_messages | User messages sent within SoSci Survey |
| sosci_projects | Survey projects |
| sosci_questionnaires | Composition of questionnaires |
| sosci_questions | Questions in the List of Questions |
| sosci_receivers | Recipients of email distribution within projects |
| sosci_sections | Sections in the List of Questions |
| sosci_serials | Authorization codes for use in projects |
| sosci_texts | Text elements and customized texts |
| sosci_urns | Ballots in urns for evenly spread random selection |
| sosci_users | User accounts |
| sosci_variables | Allocation of questions and items to variables |
| sosci_workgroup | Workgroups that can be split within their templates |
<sup>2</sup>These tables are only available as an option.