Reputation:
I would like to design a rules based database engine within Oracle for PeopleSoft Time entry application. How do I do this?
Upvotes: 1
Views: 5447
Reputation: 20151
A rules-based system needs several key components: - A set of rules defined as data - A set of uniform inputs on which to operate - A rules executor - Supervisor hierarchy
Broadly, rules engines are an exercise in managing complexity. If you don't manage it, you can easily end up with rules that cascade from each other causing circular loops, race-conditions and other issues. It's very easy to construct these accidentally: consider an email program which you have told to move mail from folder A to B if it contains the magic word 'beta', and from B to A if it contains the word 'alpha'. An email with both would be shuttled back and forward until something broke, preventing all other rules from being processed.
I have assumed here that you want to learn about the theory and build the engine yourself. alphazero raises the important suggestion of using an existing rules engine library, which is wise - this is the kind of subject that benefits from academic theory.
Upvotes: 5
Reputation: 27244
I haven't tried this myself, but an obvious approach is to use Java procedures in the Oracle database, and use a Java rules engine library in that code.
Try:
http://www.oracle.com/technology/tech/java/jsp/index.html
and
or
--
Basically you'll need to capture data events (inserts, updates, deletes), map to them to your rulespace's events, and apply rules.
Upvotes: 1