Welcome to the LimeSurvey Community Forum

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

Bad DB Design ?

  • jamjam
  • jamjam's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 8 months ago - 5 years 8 months ago #171836 by jamjam
Bad DB Design ? was created by jamjam
Hallo,

I tried to query the limeSurvey DB
and encountered, that if you want
to join the question with the given answers by users
you have to use unpivot ? Really !

So you used this SGQA codes as column names,
which one first has to create



and then well ... join somehow with



the lime_survey_<sid> table which itself
has a variable name, come on.

why not in 3rd normal form, why not.

kindly regards,
jakob
Last edit: 5 years 8 months ago by jamjam.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 8 months ago - 5 years 8 months ago #171838 by DenisChenu
Replied by DenisChenu on topic Bad DB Design ?
I think LimeSurvey dev team are happy to have a new dev to update and clean the DB ,

And create an update method to allow all LimeSurvey user to update without any issue‘s (and import lss, and lsq and etc …).

And follow during some month or year the new system to fix related issue‘s

EDIT : else use remote control API

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 5 years 8 months ago by DenisChenu.
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
5 years 8 months ago #171853 by LouisGac
Replied by LouisGac on topic Bad DB Design ?
it's like that since years, and deep into the LimeSurvey code.

normalizing DB should be done for LS4... But NoSQL table just works that way. Standards are changing all the time. So maybe we should just not normalize the DB, but rather switch to NoSQL table for survey taking? Who knows...

Priority for now has been to make visible changes for final user, not to refactor the code or the DB (at least, not more than necessary). Code refactoring has been done while moving from 1.x to 2.x: it consisted to move from PHP4 Procedural Code to Object Oriented Code using Yii... Yeah: 15 years of code layers, starting in PHP4. Did you already work on huge and very old application? Or only in small home made application coded from scratch?


As denis could tell you (I wasn't here in that time), final users didn't really seen the difference between 1.x and 2.x. I'd say they're seeing the benefit of the conversion to Yii only since LS3... Same for DB normalization: They will just not understand why we broke survey archive retro-compatibility for something that doesn't bring any advantage (for them ^^)

If you want to see how to deal with an ORM and Dynamic Tables:
github.com/LimeSurvey/LimeSurvey/blob/ma...ls/SurveyDynamic.php

This piece of art of code as been written during a Google Summer Code in 2009.
10 years ago.


If you know a bit about Microsoft Windows History (billion dollars company with huge teams of extremely good coders), they only get rid off MS DOS kernel in the Windows 10. Yeah. Get rid of the foundations of a software is not that easy.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose