Posts tagged rulegen

Implementation of a moderately complex data constraint business rule using RuleGen 3.0

In a previous article, I have introduced RuleGen 3.0 – a 2nd generation business rule implementation framework for the Oracle Database: http://technology.amis.nl/blog/?p=12807. RuleGen provides a solid, structured, scalable framework for database developers to implement data constraints in. This article demonstrates how a moderately complex rule is analyzed and designed and implemented with RuleGen 3.0. If you want to try out RuleGen yourself, you can download the framework under trial conditions from http://www.rulegen.com/free-download .

This article illustrates the essential steps in the business rule design and build process:

  • describe the business in human readable format – preferably using names of entities and attributes or even better tables and columns
  • analyze the events that potentially violate the business rule and should therefore trigger evaluation of the rule
  • define the filter condition (a SQL expression) that identifies the records that should be checked for each triggering event (typically only a very small subset of the records in a table need to be explicitly validated upon an event)
  • define the rule validation logic in terms of SQL – write the SQL query that should not return any records in order for the rule to be valid
  • record the events, the filter conditions and the validation SQL in the RuleGen design time UI
  • configure additional characteristics of the rule – such as validation time (statement or transaction), enabled status and log-setting
  • generate the rule implementation code and deploy the rule to the run time environment

note that these steps only involve a minimum of programming: typically two or three relatively simple SQL queries. No PL/SQL programming is involved. No additional tools (besides the APEX UI of RuleGen or its APIs) are required.

The rule that I will implement in this article is specified in the context of a familiar data model – see the figure below:

Image

The rule that needs to be enforced is: “Employees who are a SALESREP should not work for a department that is located in Amsterdam”. We will not be discussing the business meaning of this rule in this article – we take this rule as the outcome of careful analysis of our business. Our responsibility is to ensure that no data will enter our enterprise database that does not comply with this rule.

Read the rest of this entry »

RuleGen 3.0 – the latest, leanest and most robust solution for complex data constraints in an Oracle Database

No matter how complex the enterprise and application architectures become, no matter the number of tiers, services, devices and user interfaces – at the heart of most enterprises will be a relational database.

Image

And no matter how hard we try to implement a fully service based architecture or a multi-purpose business tier (for example using EJBs) – we will have multiple routes to the database and the data in it. Data will be manipulated through web applications, web services, client/server applications, batch database jobs, application managers working directly against the database from the command line or TOAD-like tools. If for no other reason – that by itself is an overridding motivation for enforcing every data constraint at the lowest possible level – the one level that none of these channels can avoid: the database itself. In addition to the fact that only enforcement inside the database can provide real integrity (and what the hack would be semi-real integrity?), for most data rules (especially complex ones) implementation inside the database is the most performant, scalable, maintainable, managable, agile, elegant and easy to implement as well.

Note: I am not advocating that data rules should not be implemented in other tiers as well. For the purpose of user friendliness through quick feedback and preventing incorrect data from ever getting near the database, it is of course perfectly fine to specify required fields, fields with a certainly length or a domain with allowable values in user interfaces and/or describe and enforce data constraints in the POJO Domain Model and the XSDs for the canonical data model of the ESB. However: all of these are only supplemental. They do not provide robustness.

Implementing data rules inside the database is not trivial, despite all the clear advantages outlined above.

Read the rest of this entry »

AMIS Query 18 Mei – Een Terugblik op Hotsos 2009

Begin maart 2009 werd in Irving, Texas, het internationale Oracle Performance Symposium Hotsos gehouden. Ook dit jaar stond het symposium garant voor inhoudelijke hoogstaande presentaties en discussies over performance. Vier Nederlanders, Jeroen Evers (Fameus), Toon Koppelaars (RuleGen), Gerwin Hendriksen (AMIS) en Marco Gralike (AMIS), hadden het genoegen om ter plekke te zijn en in de gelegenheid om al deze, over de aanwezigen uitgestorte (Oracle) performance verbeterende informatie, in zich op te nemen. Dit jaar was het Symposium sowieso bijzonder vanwege de 2 presentaties van Chris Date en een volledige in-depth training dag met Jonathan Lewis.
De AMIS Query “Een terugblik op Hotsos 2009”, op 18 mei aanstaande, zal een terugblik geven over het Hotsos Symposium van dit jaar en in gaan op vier, door de presentatoren, uitgekozen presentaties, onderwerpen, die op het Hotsos Symposium werden gegeven en die door ons Nederlanders als opmerkelijk werden ondervonden en/of een erg interessant onderwerp is om (ook) over te presenteren.
Jeroen Evers, een van de weinige Oracle Certified Masters in Nederland en OakTable lid, zal inhoud geven op deze avond aan de door hem bijgewoonde presentatie van Amit Poddar over “One Pass Distinct Sampling”. Een pittig onderwerp. Het is echter aan Jeroen toevertrouwd dat hij ons, netzo als in zijn dagelijkse werkzaamheden, een helder beeld kan schetsen m.b.t. de “in’s and out’s” over dit onderwerp.
Toon Koppelaars, zelf dit jaar ook weer presentator op Hotsos, mede auteur van het door velen geroemde boek “Applied Mathematics for Database Professionals” en OakTable lid, gaat deze avond presenteren over zijn visie t.a.v. de presentatie van “Using the PL/SQL Hierarchical Performance Profiler” van Bryn LLewellyn (Oracle) over een van de nieuwe performance profiler tools van de firma Oracle.
Gerwin Hendriksen, Principal Database Consultant en een van de Expertise Managers van AMIS, zal in de rebound, zijn presentatie “Practical Use of Method GAPP to Find Performance Bottlenecks for Business Processes in Complex Architectures” ten gehore geven. Dit jaar werd Gerwin voor de 2e maal gevraagd om te presenteren op Hotsos, maar door het ter plekke kapot gaan van hardware, was hij niet instaat om zijn presentatie kracht bij te zetten en in kleur en geur uit de doeken te doen. Nu eenmalig op herhaling.
Marco Gralike, AMIS, Principal Database Consultant en Oracle ACE voor het specialisme Oracle XMLDB, zal deze avond verhalen over het Symposium zelf door middel van een korte introductie over het fenomeen “Hotsos” en, later op de dag, over Christian Antognini’s presentatie over “Bloom Filters”.
Zie voor meer informatie over de Hotsos sprekers en de gegeven presentaties: Hotsos 2009
Zoals altijd is iedereen van harte uitgenodigd om gratis de AMIS Query “Een terugblik op Hotsos” bij te wonen en aan het begin van de avond zal er eten aanwezig zijn om het navolgende performance presentatie geweld snel en stabiel te kunnen doorstaan.
Schrijf je in via de: AMIS Activiteiten pagina.

Marco