Comments on: Implementation of a moderately complex data constraint business rule using RuleGen 3.0 https://technology.amis.nl/2011/08/14/implementation-of-a-moderately-complex-data-constraint-business-rule-using-rulegen-3-0/ Friends of Oracle and Java Wed, 08 Jul 2015 07:37:03 +0000 hourly 1 http://wordpress.org/?v=4.2.3 By: Martijn Hoekstra https://technology.amis.nl/2011/08/14/implementation-of-a-moderately-complex-data-constraint-business-rule-using-rulegen-3-0/#comment-6846 Thu, 01 Sep 2011 11:14:49 +0000 http://technology.amis.nl/blog/?p=12838#comment-6846 Approved by Tom 😉
http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:3868442800346504246

]]>
By: Toon Koppelaars https://technology.amis.nl/2011/08/14/implementation-of-a-moderately-complex-data-constraint-business-rule-using-rulegen-3-0/#comment-6845 Mon, 22 Aug 2011 06:07:33 +0000 http://technology.amis.nl/blog/?p=12838#comment-6845 Stew,
Beware of the serialization issue that implementing business rules with MV’s will bring you: http://rwijk.blogspot.com/2010/01/enq-ji-contention.html
Toon

]]>
By: Lucas Jellema https://technology.amis.nl/2011/08/14/implementation-of-a-moderately-complex-data-constraint-business-rule-using-rulegen-3-0/#comment-6844 Sat, 20 Aug 2011 07:00:15 +0000 http://technology.amis.nl/blog/?p=12838#comment-6844 Thanks Stew for this wordless demonstration. Your implementation will of course do the job of making sure that no SALESREP from AMSTERDAM enters the database.

The point of this article was not so much to demonstrate a particular business rule. I have written it to show how RuleGen can be used to design and implement business rules – both simple and complex – without coding beyond simple SQL statements. Besides the implementation and enforcement, RuleGen offers facilities to manage all rules, monitor violations, aggregate multiple violations (all that is wrong with a transaction) and do other useful things that your implementation does not have out of the box. (also see: http://technology.amis.nl/blog/475/introducing-materialized-views-as-mechanism-for-business-rule-implementation-complex-declarative-constraints – published in 2005)

]]>
By: Stew Ashton https://technology.amis.nl/2011/08/14/implementation-of-a-moderately-complex-data-constraint-business-rule-using-rulegen-3-0/#comment-6843 Mon, 15 Aug 2011 06:05:41 +0000 http://technology.amis.nl/blog/?p=12838#comment-6843 create materialized view log on EMP with rowid, primary key(job) including new values;
create materialized view log on DEPT with rowid, primary key(LOC) including new values;

create materialized view NO_SALESREP_FROM_AMSTERDAM
build immediate refresh fast on commit as
select a.rowid arid, B.rowid brid
from EMP a, DEPT B where a.DEPTNO = B.DEPTNO
and a.job = ‘SALESREP’ and B.LOC = ‘AMSTERDAM';

alter materialized view NO_SALESREP_FROM_AMSTERDAM add constraint NO_SALESREP_FROM_AMSTERDAM
check (1=0) deferrable;
Done!

]]>