First of all, let me agree to veto the idea of storing HTML in a database, with the possible exception of a few tags, such as line breaks, bold, emphasis and underline, only for the question text. Defining surveys and using their results will be much easier if you focus on the text / semantics of the survey rather than View .
To support View ("layout"), the CSS configuration may be a ticket. This will include the identifier of the question, which will be used as the identifier for the div (or other html container) where View decides to save the question. multiple class names can also be specified in the question entry, but defined in CSS.
There seem to be important things in the proposed database schema. However, I do not see where the responses received are stored; is that in table view + submingsdetails? If so, where will the MULTIPLE response type be stored, are they converted to text in the dataanswer? (I don’t think they should, unless we chose to display slightly different values when the poll was changed during the campaign.)
A few missing attributes and ideas:
- MULTIPLE (or another type) should be able to support the choice of the type of "radio button" ("only one"). a possible way to do this is to add an attribute to the type in order to determine the maximum number of allowed options, the general poll thing: "select 3 from the following ..."
- The question record can be a “campaign” or SurveyID , which allows you to store multiple surveys in one repository.
- Without hesitation, some questions may be related to the previous question such as "Boolean" . (If the person interviewed answered “no” to own a car, do not ask about the oil change frequency ...) This can be determined using the identifier questionID and ResponseValue (? Text for general?).
- Question table: Add a “Page Number ” to group questions (if this information is not defined in the concept of the question container, such as “survey” or “campaign”).
- Question table: add a ' Sequential number ' that allows you to ask questions in a predetermined order (if this is not from the survey / campaign table not shown here)
- q_multiplechoice: (or any table that lists the parameters for this MULTIPLE CHOICE, I have doubts about this table, seeing its fields as showin in the question.) add a Sequence Number to list the parameters in a specific order.
source share