Data Modeling With Logical Operators

  • From: "kalyan inuganti" <inuganti@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 5 Jun 2007 16:06:33 -0500

All,

I am trying to model a simple rule (conditional) based data model with
logical operators (and, or etc.). For example, a rule can be a composition
of any number of rule conditionals (see below)-

Example rules:

1. RuleConditionalA
2. RuleConditionalA AND RuleConditionalB
3. RuleConditionalA AND (RuleConditionalB OR RuleConditionalC)
4. RuleConditionalA OR (RuleConditionalB AND RuleConditionalC)
etc.

To enforce data integrity, I can come up with the RULE_CONDITIONAL,
RULE_CONDITIONAL_RULE_XREF, RULE tables that enforce the relationship
between RULE_CONDITIONALS and RULES. To come up with the rule composition, I
can only think of a RULE_COMPOSITION table that has a RULE_ID and
EXPRESSION. The expression column contains something along the lines of
items 1,2,3, and 4. Expression is built through a User Interface using the
RULE_CONDITIONAL, RULE, OPERATOR (s). However, the downside is that it has
no ref integrity etc.

I am sure there is a standard data model for such problems and was wondering
if anybody can direct me in the right direction, or give some pointers on
how this can be modeled better.

Thanks,
Kal

Other related posts: