We were required to develop a user-configurable calculation
engine to interface to a SAP R3 system. This system would
allow the user to specify their own calculation formulae for
implementation, as well as build their own business model
allowing them to specify business entities and the relationships
between them.
A traditional approach would be to build custom modules for
each implementation, but, due to the rapidly changing nature
of some of the markets within which it would be deployed,
this was not a viable option as there would be insufficient
time to make system changes when these events occurred. Rather
than develop our own formula parser, we were able to use
innovative database and query design to leverage the SQL Server
SQL parser. A key part of this was being able to run our calculations
in a set-based manner, which had significant performance benefits.
Reusing the SQL Server SQL parser meant that we were able
to reduce significantly the required development and testing
cycles.