We are building a survey engine for our internal use. I would like to know how to persist the question branching logic into the database? Any body done this before or any ideas on the schema for the database?
If the user responses with an answer, we need to skip to the next questions based on the logic added to the questions Each question can have multiple logic added to it.
For eg:
Question: Is it Sunny, Raining or Cloudy?
Answer: Raining.
The next question should be based on the previous answer.
if(Raining)
{
}
if(Sunny)
{
}
if(Cloudy)
{
}
how do I persist the above to the database and go from there?
Any bright ideas ?