How to configure 'rules' at runtime
<p>I am currently unsure on how to move forward with my requirement.</p>

<p>I posted a question which was thoroughly answered in a previous post <a href="http://stackoverflow.com/questions/10409956/designing-hierarchical-schema-in-mysql">Designing Hierarchical Schema in MySQL</a></p>

<p>That question was fairly simple and it's hierarchical.</p>

<p>Now, I need to provide some runtime evaluation of the user's answer.</p>

<p>Use Case is like this:</p>

<p>It's a survey type of system, where user is asked a question and depending on his answer, a different set of questions will pop out.
For simple multiple choice type of question, there should be no problem.
But user request if they could configure something without the need for reprogramming.</p>

<p>Some sort of an algorithm/rule that is configured outside the system and they could use database as source of this rule.</p>

<pre><code>Example.
For Question 1:
    - How old are you?

        If answer &gt; 18
            - then go to Q2
        else
            - then asnwer Q2 and Q3

If you are at Question 2:
    -  Where is your area?
        If answer is City
            - then go to Q4
        else if answe is Province
            - then go to Q5
        else
            - then go to Q6
.
.
.
etc...
</code></pre>

<p>How do I satisfy such requirement?</p>

<p>Sorry if my question is vague and I just dont have any idea how to move forward.</p>

<p>Thanks.</p>
