How to store rules in Knowledge base
Hi forumers

;
i'm currently develop expert system using VB 6.0.
the problem is i don't know how to store all my rules inside database and call it from coding to infer user answer.
all those if..else thing now in my coding.
i don't know how to represent the rule into code and store in database (knowledgebase).
in my user interface i use radio/option button control to get answer from user.
each different answer for every question i set certain weightage.
These are the rules that currently hard-coded in source code. I don't know which want must be put in database and how to put it in database. Pls help me. Thanks in advance.
'R1
If notfresh.Value = True And smelly.Value = True And yellowmescrp.Value = True Then ' the rule
gred.unripe = 0 'the weightage
gred.almostripe = 0 'the weightage
gred.ripen = 0 'the weightage
gred.emptybunch= 0 'the weightage
gred.smelly = 10 'the weightage
'R2
ElseIf notfresh.Value = True And smelly.Value = True And yellworangemescrp.Value = True Then
gred.unripe = 0
gred.almostripe = 0
gred.ripen = 0
gred.emptybunch = 0
gred.smelly = 10
'R3
ElseIf fresh.Value = True And more10.Value = True And darkred.Value = True And orangemescrp.Value = True Then
gred.unripe = 0
gred.almostripe = 0
gred.ripen = 8
gred.emptybunch = 10
gred.smelly = 0
End If