issue 778

Ruslan Zasukhin sunshine at public.kherson.ua
Tue May 24 13:37:20 CDT 2005


On 5/23/05 11:12 PM, "Peter Salomon" <peter.salomon at gmx.net> wrote:

Hi Peter,

I CC to list because this is general db design issue.


> well, maybe i chose the wrong concept. and i agree - my methods ARE long...
> :-)  if you like, perhaps you could help thinking about another solution.
> 
> the application is a kind of knowledge test. we have about 200 questions a
> client must answer. each clients answer is stored in a table as bolean result:
> 1 means answer correct, 0 answer is wrong.

> my 200 questions are parts of specific topics, so i want to know the
> percentage of correct and wrong answers belonging to each topic.

If your next test will have 500 or 1000 questions, you will do 500 columns
in table? Not good.

Columns should be stable.
Rows can grow.

So you can Rotate your solution, and put questions and answers into rows of
table.
 
> if correct answers are more than 70% client is good, if they are less than 30%
> - well - client could be better.
> 
> so i made in valentina: one table in which all client´s answers are stored,
> e.g. 
> 
>         fldanswer1, fldanswer2, fldanswer3,....fldanswer200
> rcclient1 
> rcclient2 
> rcclient3 
> 
> just to have an example:
> to topic1 belongs answer1, answer2, answer3
> 
> so i used the expression to get the arithmetic middle of the fields:
> (fldanswer1 + fldanswer2 + fldanswer3) / 3 * 100
> 
> the same methodfield compares now the expression to get a string result, as
> "good" or "bad" (middle range is not of interest here)
> 
> i used the method you know already:
> "IF (fldanswer1 + fldanswer2 + fldanswer3) / 3 * 100) < 30, 'bad',
> IF(fldanswer1 + fldanswer2 + fldanswer3) / 3 * 100) < 70, 'middle', 'good'))

 
> now, as i try to explain i see some items to be done better because i let
> valentina count each time twice the result, right?

> so better to have one methodfield (lets say "mfldresult" which stores result
> of the expression: (fldanswer1 + fldanswer2 + fldanswer3) / 3 * 100
> and then a second one which makes comparison like:
>  
> IF mfldresult < 30, 'bad', IF mfldresult < 70, 'middle', 'good'))
>  
> so i could reduce length of methodstrings half and maybe results are computed
> faster because only one time, yes?
> 
> or do i work blind for the obvoius?
> perhaps hou have better suggestions?
> 
> greetings - peter

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list