Two approaches
Choose where SQL selection belongs.
Rule DB integrates SQL queries into a rule-based decision-management system using either SQL Outside Rules or SQL Inside Rules.

Traditional integration
SQL outside rules creates intermediate objects.
Traditionally, an application uses SQL to create objects extracted from the database—potentially millions of them—and invokes a rule engine for individual objects or collections.

Direct integration
SQL inside rules keeps selection with the model.
Rule DB removes unnecessary intermediate objects. Record selection and business logic can both be represented in the rules repository.
Pure selection logic moves from SQL into an Excel-based DataSQL table, while business analysts concentrate on business logic in decision tables. See the introductory example or the more complete SQL Inside Rules model.


