Rule Contexts in Active Databases
Martin Sköld, Esa Falkenroth, and Tore Risch
Dept. of Computer and Information Science, Linköping University, Sweden
ABSTRACT
Engineering applications that use Active DBMSs (ADBMSs) often need to group
activities into modes that are shifted during the execution of different
tasks. This paper presents a mechanism for grouping rules into contexts that
can be activated and deactivated dynamically. The ADBMS monitors only those
events that affect rules of activated contexts. By dynamic rule grouping the
rules to be monitored can be changed during the transactions. This can be
contrasted by static rule grouping where the rules are associated with
specific objects during the schema definition. A rule is always activated
into a previously defined context. The same rule can be activated with
different parameters and into several different contexts. Rules in a context
are not enabled for triggering until the context is activated. However, rules
can be directly activated by activating them into a previously activated
context. When rule contexts are deactivated all the rules in that context are
disabled from triggering. User defined contexts can be checked at any time in
a transaction. Rule contexts can be used as a representation of coupling
modes, where the ADBMS has built-in contexts for immediate, deferred,
and detached rule processing. These built-in coupling modes are always
active and are automatically checked by the ADBMS. Contexts and rules are
first-class objects in the ADBMS. Database procedures can be defined that
dynamically activate and deactivate contexts and rules to support dynamically
changing behaviours of complex applications. The context mechanism has been
implemented in the AMOS ADBMS. The paper concludes with an example of a
manufacturing control application that highlights the need for rule contexts.
Download the paper
(40067 bytes).
Esa Falkenroth
<esafa@ida.liu.se>