Storing Business Rules in a Database

by Paul Browne

On a recent client project, we ended writing more than 300 business rules to reflect some of the financial decision making that they applied to an application (excuse me if I'm being suitably vauge with this). Many of these rules would be shared across applications. The rules engine used was the Java based JBoss rules engine (formerly known as Drools).

Obviously , these rules need to be stored somewhere. Most large organisations are comfortable with the idea of using a Database such as Oracle or Sql-Server to carry out this task. This article , for version 2 of Drools but also applicable to the latest release, shows you how to use a database to store your business rules.

More in Technology in Plain English


2006-11-14 10:35:47
You are right in that rules need to be stored somewhere. There are some more possibilities here.
1. If your rules are going to change often, you can put your rules in the database which will be picked up by your Rule Engine Session bean.
2. You can bundle your rules with your EAR in your appserver, if you are an ISP
3. You can alternatively use a specialized Rule Repository that will act as a Rule base instead of a Database and your Rule Session Bean can pick up rules from the Repository.
4. Rule Repositories allow you to Invoke Historical Rules. You can replay past scenarios by applying rules that were Valid as on a past date