Bad DB Design ?

8 months 3 weeks ago - 8 months 3 weeks ago #171836 by jamjam
Bad DB Design ? was created by jamjam

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,
Last edit: 8 months 3 weeks ago by jamjam.

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
8 months 3 weeks ago - 8 months 3 weeks 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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Last edit: 8 months 3 weeks ago by DenisChenu.

Please Log in or Create an account to join the conversation.

8 months 3 weeks 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:

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 following user(s) said Thank You: tpartner

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!