Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!postnews.google.com!y43g2000cwc.googlegroups.com!not-for-mail
From: "Mikito Harakiri" <mikharakiri_nospaum@yahoo.com>
Newsgroups: comp.object,comp.databases.theory
Subject: Rule engines
Date: 6 Jun 2006 09:46:08 -0700
Organization: http://groups.google.com
Lines: 63
Message-ID: <1149612368.730406.302930@y43g2000cwc.googlegroups.com>
References: <1146511334.017391.308950@j73g2000cwa.googlegroups.com>
   <1146676751.556835.64520@u72g2000cwu.googlegroups.com>
   <2006052811514650878-unclebob@objectmentorcom>
   <1148889904.244945.140270@i39g2000cwa.googlegroups.com>
   <2006052909502075249-unclebob@objectmentorcom>
   <1149004400.683026.180810@y43g2000cwc.googlegroups.com>
   <447cd56d$0$12746$636a55ce@news.free.fr>
   <2006053109501933169-unclebob@objectmentorcom>
   <1149093908.290039.174150@g10g2000cwb.googlegroups.com>
   <873bell4ea.fsf@bhawa.web.de>
   <1149539249.630460.46120@i39g2000cwa.googlegroups.com>
   <m2mzcqzty1.fsf@Dagney.local>
NNTP-Posting-Host: 148.87.1.171
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1149612374 26250 127.0.0.1 (6 Jun 2006 16:46:14 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 6 Jun 2006 16:46:14 +0000 (UTC)
In-Reply-To: <m2mzcqzty1.fsf@Dagney.local>
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4,gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 inet-nc02 (NetCache NetApp/5.6.2R1D19)
Complaints-To: groups-abuse@google.com
Injection-Info: y43g2000cwc.googlegroups.com; posting-host=148.87.1.171;
   posting-account=jduQMA0AAABKdEh0L1SEqrR3hnlHUlAG
Xref: dp-news.maxwell.syr.edu comp.object:140146 comp.databases.theory:41098

Patrick May wrote:
> "Mikito Harakiri" <mikharakiri_nospaum@yahoo.com> writes:
> > > Not every business rule can be expressed in (even a complex)
> > > formula. Ever heard of rule based systems?
> >
> > What about them? Rule based systems are extremely goofy way to
> > program business rules. No exceptions, no arithmetics, no
> > loops. Rule firing order is nondeterministic. I would prefer an
> > implementation in traditional programming language to rule based
> > system any day.
>
>      While your summary is correct for Rete based rules engines, I
> recently saw a demo by ILog that showed how they have extended the
> basic algorithm to allow grouping of rules into sets that can be
> applied in order and based on decision points.  It really blurs the
> distinction between rules engine and programming language.
>
>      My client is considering using it to allow end users in finance
> and marketing to change rules without involving the development
> teams.  I'm curious to see how well this experiment works.

Failed to download ilog demo. Got their whitepaper "Why business
rules?" however. Let's go through examples:

Page 6, Figure 2. Business rule which can easily enforced in DBMS.

create view discountedOrder
select
    case when c.state = 'MN' and c.value = 'Gold'
            and o.date between 'jan1' and 'feb2'
    then
            sum(o.price)*0.9
    else
            sum(o.price)
    end AS total,
    ... comment
from Customer c, Order o
where c.customer_id = o.customer_id

All you need to do in application code which processes shopping cart is
to select from this view with particular order#.

Page 7, Table 2. This table is designed either by moron or a clever
salesman who deliberately made it goofy to warrant a case for "rules
engine". Why don't they have

1. A list of states with cost of living index

MD  0.5
CA  1.0
FL   0.8
.........

2. A fixed classification to Gold-Platinum-Silver

Gold    > $1000
$1000 > Platinum  > $500
Silver < $500

Then the rule of classifying cusomer into Gold-Platinum-Silver is just
taking the dollar amount, adjusting it for cost of living and checking
what bracket it falls into. Again, implemented in DBMS easly.

