0
This question is not directly linked to code, but and the basic part of my project, I am currently divided into 2 options (which I will describe in detail below).
Currently the UML is this way, (meets more information in blue and purple;
My questionnaire will be basically a tool to which the user can assemble his questionnaire based on the ones that already exist pre-registered in the system and so answer them (I am being very brief about this information),
Now let’s get to my problem:
Each questionnaire has its question, which has its answer option, which finally has the correct answer,
The problem is in defining the correct option, currently I am between these two options:
- Enter this information in the question itself (for example: option A, or idOpicao 123)
- Or leave the information in the response option itself, (for example: Boolean true for correct option)
Because the doubt between them;
The (1) in a possible correction or exclusion of the response option, it would already mess with the answers already made of the answered ones, because they would be related to the id
, and define option A, B or C in a questionnaire with 200 questions I believe this would perform horribly, and I have the impression of being a great gambiarra.
Already the (2) enters again the problem of performance, because to know which is the correct option it would be necessary to always go through the answers to know which is the correct option, a questionnaire with 200 questions and 5 answer options would already have a reasonable weight.
In short my problem is how to define this relationship of question, answer option and correct answer?
In the answer I would like a justification to use the method answered.
Yes, I’ve made the correction
– Bulfaitelo