Comments on: 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 By: Martijn Hoekstra Thu, 01 Sep 2011 11:14:49 +0000 Approved by Tom 😉

By: Toon Koppelaars Mon, 22 Aug 2011 06:07:33 +0000 Stew,
Beware of the serialization issue that implementing business rules with MV’s will bring you:

By: Lucas Jellema Sat, 20 Aug 2011 07:00:15 +0000 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: – published in 2005)

By: Stew Ashton Mon, 15 Aug 2011 06:05:41 +0000 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;