This is the first post about implementing business rules in an Oracle database. In the previous millenium I've implemented them a lot using CDM RuleFrame and its business rule classification scheme. This was all done using Oracle7. And business rules were either implemented using check constraints or, most of the time, using database triggers. Since then, a lot has changed, which have changed my preferred way of implementing business rules. These changes include:
- The current Oracle database version is now 11gR1. Since version 7, a lot of new techniques have become available to use when implementing business rules. Examples of these are function based indexes, on commit refreshable materialized views and virtual columns.
- Database triggers are considered evil, or at least by me.
- Three discussions on AskTom.
- A very good paper by OakTable member Toon Koppelaars
- A great rant by should-be-Oracle-Ace Billy Verreynne
In the next posts I will walk through this classification scheme and discuss for each class how a business rule can or should be implemented nowadays in my opinion.
Implementing attribute and tuple rules
Implementing entity rules
Implementing inter-entity rules
Implementing dynamic data constraints
Implementing change event rules