You are on page 1of 42

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/220566764

Active Database Systems

Article  in  ACM Computing Surveys · March 1999


DOI: 10.1145/311531.311623 · Source: DBLP

CITATIONS READS
521 1,063

2 authors, including:

Oscar Díaz
Universidad del País Vasco / Euskal Herriko Unibertsitatea
182 PUBLICATIONS   2,214 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Contributing to Free, Libre and Open Source Software View project

Testmind View project

All content following this page was uploaded by Oscar Díaz on 21 May 2014.

The user has requested enhancement of the downloaded file.


Active Database Systems
NORMAN W. PATON
University of Manchester

AND
OSCAR DÍAZ
University of the Basque Country

Active database systems support mechanisms that enable them to respond


automatically to events that are taking place either inside or outside the database
system itself. Considerable effort has been directed towards improving
understanding of such systems in recent years, and many different proposals have
been made and applications suggested. This high level of activity has not yielded a
single agreed-upon standard approach to the integration of active functionality
with conventional database systems, but has led to improved understanding of
active behavior description languages, execution models, and architectures. This
survey presents the fundamental characteristics of active database systems,
describes a collection of representative systems within a common framework,
considers the consequences for implementations of certain design decisions, and
discusses tools for developing active applications.

Categories and Subject Descriptors: H.2.3 [Database Management]: Languages


General Terms: Languages
Additional Key Words and Phrases: Active databases, events, object-oriented
databases, relational databases

1. INTRODUCTION the application. However, database sys-


Traditionally, database systems have tems are beginning to be applied to a
been viewed as repositories that store range of domains associated with highly
the information required by an applica- complex information processing, ever
tion, and that are accessed either by more substantial quantities of data, or
user programs or through interactive highly stringent performance require-
interfaces. In such a context, a range of ments, in which the conventional multi-
different tools and systems are used to- component environment has proved to
gether to support the requirements of be unsatisfactory. This has resulted in a

We are pleased to acknowledge the support of the European Union Human Capital and Mobility
Network ACT-NET, the UK Engineering and Physical Sciences Research Council (Grant GR/H43847)
and the Basque Government for funding active database research involving the authors.
Authors’ addresses: N. W. Paton, Department of Computer Science, University of Manchester, Oxford
Road, Manchester M13 9PL, UK; e-mail: ^norm@cs.man.ac.uk&; O. Dı́az, Departamento de Lenguajes y
Sistemas Informaticos, University of the Basque Country, San Sebastián, Spain; e-mail:
^jipdigao@si.ehu.es&.
Permission to make digital / hard copy of part or all of this work for personal or classroom use is granted
without fee provided that the copies are not made or distributed for profit or commercial advantage, the
copyright notice, the title of the publication, and its date appear, and notice is given that copying is by
permission of the ACM, Inc. To copy otherwise, to republish, to post on servers, or to redistribute to
lists, requires prior specific permission and / or a fee.
© 1999 ACM 0360-0300/99/0300–0063 $5.00

ACM Computing Surveys, Vol. 31, No. 1, March 1999


64 • N. W. Paton and O. Dı́az

trend in database research towards late (e.g., the coach is added, but only
more of the functionality required by an after several customers have been
application being supported within the turned away).
database system itself, giving rise to Active databases support the preced-
database systems with more compre- ing application by moving the reactive
hensive facilities for modeling both the behavior from the application (or polling
structural and the behavioral aspects of mechanism) into the DBMS. Active da-
an application. Among the fields that tabases are thus able to monitor and
have received attention in recent years react to specific circumstances of rele-
with a view to enhancing the behavioral vance to an application. The reactive
facilities of database systems are data- semantics is both centralized and han-
base programming, temporal databases, dled in a timely manner. An active da-
spatial databases, multimedia data- tabase system must provide a knowl-
bases, deductive databases, and active edge model (i.e., a description
databases. This survey focuses upon the mechanism) and an execution model
last mentioned. (i.e., a runtime strategy) for supporting
Traditional database management this reactive behavior.
systems (DBMSs) are passive in the A common approach for the knowl-
sense that commands are executed by edge model uses rules that have up to
the database (e.g., query, update, de- three components: an event, a condition,
lete) as and when requested by the user and an action. The event part of a rule
or application program. However, some describes a happening to which the rule
situations cannot be effectively modeled may be able to respond. The condition
by this pattern. As an example, consider part of the rule examines the context in
a railway database where data are which the event has taken place. The
stored about trains, timetables, seats, action describes the task to be carried
fares, and so on, which is accessed by out by the rule if the relevant event has
different terminals. In some circum- taken place and the condition has eval-
stances (e.g., public holidays, cultural uated to true.
events) it may be beneficial to add addi- Most active database systems support
tional coaches to specific trains if the rules with all three of the components
number of spare seats a month in ad- described; such a rule is known as an
vance is below a threshold value. Two event-condition-action or ECA-rule. In
options are available to the administra- some proposals the event or the condi-
tor of a passive database system who is tion may be either missing or implicit. If
seeking to support this requirement. no event is given, then the resulting
One is to add the additional monitoring rule is a condition-action rule, or pro-
functionality to all booking programs so duction rule. If no condition is given,
that the preceding situation is checked then the resulting rule is an event-ac-
each time a seat is sold. However, this tion rule.
approach leads to the semantics of the At first glance, the introduction of
monitoring task being distributed, repli- active rules to a database system may
cated, and hidden among different ap- seem like a straightforward task, but in
plication programs. The second ap- practice proposals have been made that
proach relies on a polling mechanism support widely different functionalities.
that periodically checks the number of Among the issues that distinguish pro-
seats available. Unlike the first ap- posals are the expressiveness of the
proach, here the semantics of the appli- event language, the scope of access to
cation is represented in a single place, database states from the condition and
but the difficulty stems from ascertain- action, and the timing of condition and
ing the most appropriate polling fre- action evaluation relative to the event.
quency. If too high, there is a cost pen- The functionality of a specific system
alty. If too low, the reaction may be too will be influenced by a number of fac-

ACM Computing Surveys, Vol. 31, No. 1, March 1999


Active Database Systems • 65

tors, including the nature of the passive (e.g., a new wire is created of an exist-
data model that is being extended, and ing wire-type, the max-voltage of a
the categories of application to be sup- wire-type is updated, etc.) that can
ported. then be monitored by a set of system-
generated active rules. For example, to
1.1 Active Database Applications check for violation of the constraint on
insertion of a new wire, the following
As mentioned previously, database re- active rule could be used.
search often aims to extend the range of
facilities within the database system for on insert into wire
representing application concepts. if insert.voltage . any
Hence, additional capabilities are (select max-voltage
largely dependent on the designated ap- from wire-type
plications. In the case of active rules, where type 5 insert.type)
the following categories of application do ^action&
can be distinguished. Here, the on clause defines the event
Database System Extensions. Active (the insert of a tuple into the wire
rules can be used as a primitive mecha- relation), the if clause expresses the
nism for supporting the implementation condition, and the do clause specifies
of other parts of a database system. For the action. Information about the event
example, ECA rules have been used to is referred to in the condition by access-
support integrity constraints [Ceri et al. ing the voltage and type of the newly
1990; Diaz 1992], materialized views inserted tuple using the reserved word
[Stonebraker et al. 1990; Widom et al. insert. In this example, the action
1991], derived data [Etzion 1993], coor- could be defined in different ways—the
dination of distributed computation update operation could be blocked by
[Dayal et al. 1990; Ceri and Widom aborting the transaction, the constraint
1993], transaction models [Geppert and could be repaired by changing the volt-
Dittrich 1994], advanced data modeling age of the inserted wire, and so on.
constructs [Paton et al. 1993], and auto-
matic screen updating in the context of Closed Database Applications. This
database change [Diaz et al. 1994; Pa- category of application involves the use
ton et al. 1996]. of active functionality to describe some
Such extensions to core database of the behavior to be manifested by a
functionality are usually supported by software system without reference to
defining a high-level syntax for the ex- external devices or systems. For exam-
tended functionality, plus a mapping ple, rules might be used to describe
onto sets of active rules. For example, repair actions in a modeling database,
Ceri et al. [1990] present a constraint to monitor sales in a stock control data-
language for implementation using ac- base, to propagate load calculations in
tive rules, illustrated using an applica- an architectural design database, or to
tion that models a power distribution anticipate market activity in a portfolio
system. In this constraint language, the management database. In these appli-
restriction that no wire has a voltage cations there may not be any mapping
that is greater than that of its type is from a higher-level description onto the
expressed thus: active rule language—ECA rules are
used directly to support the semantics
wire:voltage . any of the application. For example, in a
(select max-voltage portfolio management database a rule
from wire-type
where type 5 wire.type)
could be written that deletes any stock-
holders whose portfolios have value 0,
This constraint can be violated by a while at the same time recording these
range of different update operations holders in a distinct relation:

ACM Computing Surveys, Vol. 31, No. 1, March 1999


66 • N. W. Paton and O. Dı́az

on update to value of Holder do ^send message to control-


if new.value 5 0 ler&
do begin
delete from Holder where In this example, the event being mon-
reg# 5 update.reg#; itored is the position of an aircraft com-
insert into VoidHolder municated to the database from an ex-
values (update.reg#, update. ternal device, and the action taken is a
name, update.address, to- change to a display that the air traffic
day) controller is monitoring. Both the new
end value and the old value for the pos
In this example, the event monitors affected by the event are accessed from
updates to the value attribute of the within the condition.
Holder relation. The condition then
checks the new element that has been 1.2 Outline of Survey
assigned to the value attribute to see if
it is 0. If so, then the action is executed, This survey provides an overview of re-
which deletes the updated tuple from cent research into active database sys-
the Holder relation, and then inserts tems. Section 2 introduces an example
information from the deleted tuple into application that is used throughout the
the VoidHolder relation. It is worth article. Section 3 presents the struc-
noting that both the condition and the tural characteristics of active rules, and
action of this rule require access to in- Section 4 shows how different execution
formation on the update that triggered models can be used to characterize the
the rule. runtime interpretation of a set of rules.
Section 5 indicates what facilities may
Open Database Applications. In this be available for managing rule bases,
category of application, a database is and Section 6 describes and compares a
used in conjunction with monitoring de- range of representative active database
vices to record and respond to situations systems within the framework pre-
outside the database. For example, sented in Sections 3 to 5. Section 7
rules could be used in command and indicates what architectural features
control applications to respond to evolv- are important for the implementation of
ing battlefield scenarios [Dayal et al. an active database system and Section 8
1988], in medical applications to warn considers the facilities that are useful
physicians of changes in a patient’s con- for supporting the development of appli-
dition [Blue et al. 1988], in transport cations using active functionality. Sec-
applications to anticipate traffic hold- tion 9 presents some conclusions.
ups, and in air-traffic control to detect
potentially dangerous aircraft move-
ments [Naqvi and Ibraham 1994]. For 2. EXAMPLE APPLICATION
example, in an aircraft monitoring data- This section introduces a portfolio man-
base, the following rule adapted from agement database that is used through-
Naqvi and Ibraham [1994] could inform out the article to exemplify the function-
a controller when two aircraft are ap- ality of active database systems
proaching each other. [Chandra and Segev 1994]. In fact, a
range of different financial applications
on update to pos of aircraft stand to benefit from the presence of
if exists
(select p
active functionality for monitoring fi-
from aircraft Other nancial transactions, identifying un-
where distance (Other.pos, usual patterns of activity, enforcing in-
new.pos) , 5000 and tegrity constraints, maintaining derived
distance (Other.pos,old. data, generating timely reports, and
pos) . 5000) performing periodic processing. The rel-

ACM Computing Surveys, Vol. 31, No. 1, March 1999


Active Database Systems • 67

Figure 1. Entity/Relationship diagram for portfolio database.

evant entities and relationships are de-


picted graphically in Figure 1.
In this example, a Holder is an indi-
vidual or organization that owns stocks.
Every Holder has a unique registration
number, a name, a country, and a total
value of stock held. An organization
that has been floated on the stock mar-
ket is represented by the entity type
Stock, and has attributes that record
its name, share price, the total number
of shares available, and the unique
identification number by which it can be
referenced. The Owns relationship indi-
cates that a Holder possesses qty
items of a particular kind of Stock. A
relational schema for implementing this
database using SQL is presented in Fig-
ure 2. Figure 2. Relational tables for storing portfolio
information.
Specific examples of active behavior
that can be used in this application are
introduced when they are used to illus-
trate concepts, rather than presented as is in contrast to the execution model,
a group here. Where rules are presented which determines how a set of rules
in this survey, the syntax used is not behaves at runtime, as presented in
that of any specific active rule system, Section 4. As the knowledge model es-
but rather a notation based upon SQL sentially supports the description of ac-
that should require minimal explana- tive functionality, the features dealt
tion. with in this section often have a direct
representation within the syntax of the
3. KNOWLEDGE MODEL rule language. Rather than using any
particular rule language to illustrate
The knowledge model of an active data- features of the knowledge model, this
base system indicates what can be said section is based around a number of
about active rules in that system. This dimensions of active behavior, which ex-

ACM Computing Surveys, Vol. 31, No. 1, March 1999


68 • N. W. Paton and O. Dı́az

Table I. Dimensions for the Knowledge Model

tend those presented in Paton et al. therefore involves providing a descrip-


[1994]. These dimensions essentially tion of the happening that is to be mon-
make explicit the decision space within itored. The nature of the description
which the designers of active rule sys- and the way in which the event can be
tems work, without endeavoring to pro- detected largely depend on the Source
vide any formal description of the se- or generator of the event. Possible alter-
mantics of specific rule systems, a topic natives are:
that is dealt with in Section 8.2.
The concepts considered in this sec- —structure operation, in which case
tion as dimensions are clearly not the event is raised by an operation on
new—the aim is to provide a framework some piece of structure (e.g., insert a
for characterizing active database func- tuple, update an attribute, access a
tionality, rather than to introduce new tuple);
notions, so the terminology used should
be familiar to the readers of papers such —behavior invocation, in which case
as Dayal et al. [1988], Widom and the event is raised by the execution of
Finkelstein [1990], and Stonebraker et some user-defined operation (e.g., the
al. [1990]. The dimensions of rule func- message display is sent to an object of
tionality considered in this article are type widget). It is common for event
presented in a tabular form. In the ta- languages to allow events to be raised
bles, the symbol , is used to indicate before or after an operation has been
that the particular dimension can take executed;
on more than one of the values given, —transaction, in which case the event
whereas [ indicates a list of alterna- is raised by transaction commands
tives. (e.g., abort, commit, begin-transac-
The knowledge model of an active rule tion);
is considered to have (up to) three prin- —abstract or user-defined, in which
cipal components, an event, a condition, case a programming mechanism is
and an action. The dimensions associ- used that allows an application pro-
ated with these structural components gram to signal the occurrence of an
of an active rule are presented in Table event explicitly (e.g., in response to
I and discussed in the following sec- some information entered by a user);
tions.
—exception, in which case the event is
3.1 Event
raised as a result of some exception
being produced (e.g., an attempt is
An event is something that happens at made to access some data without ap-
a point in time. Specifying an event propriate authorization);

ACM Computing Surveys, Vol. 31, No. 1, March 1999


Active Database Systems • 69

—clock, in which case the event is interval Int; not—not E 1 in Int detects
raised at some point in time [Dayal et the nonoccurrence of the event E 1 in the
al. 1988; Gatziu and Dittrich 1994]. interval Int.
Absolute (e.g., the 13th of November As an example of a rule with a com-
1998 at 15:00), relative (e.g., 10 days posite event, the following rule enforces
after the shares are sold), and peri- the constraint that the qty attribute of
odic (e.g., the first day of every stock is the same as the amount re-
month) time events are reported in corded in the Owns relation.
the literature;
—external, in which case the event is on update to qty of Holder or
update to qty of Stock or
raised by a happening outside the da- insert to Stock or
tabase (e.g., the temperature reading delete to Stock or
goes above 30 degrees [Dayal et al. insert to Holder or
1988]). delete to Holder
if exists
The Event Granularity of an event (select p
indicates whether an event is defined from Stock
for every object in a set (e.g., every where qty Þ
instance of a class), for given subsets (select sum(qty)
(e.g., all staff members except profes- from Owns
sors) or for specific members of the set where Owns.reg# 5 Stock-
(e.g., to prevent unauthorized access to .reg#)
specific instances, or to enable the up- )
date of the specific widget objects that do abort
are presently on screen [Diaz et al. As a further example, to detect whether
1994]). a stock price has changed during a
The Type of an event can be: working day the event can be used: on
—primitive, in which case the event is update to price of Stock in
raised by a single low-level occurrence [09:00, 17:00].
that belongs to one of the categories Rich event algebras have been pro-
described in Source. For example, posed for a range of systems, including
the event on insert to Owns mon- HiPAC [Dayal et al. 1988], SAMOS
itors the insertion of new tuples into [Gatziu and Dittrich 1994], ODE [Ge-
the Owns relation. hani et al. 1992], and Sentinel [Chakra-
varthy et al. 1994]. However, composite
—composite, in which case the event is
event handling presents challenges in
raised by some combination of primi-
terms of semantics and efficiency that
tive or composite events using a range
have yet to be fully addressed.
of operators that constitute the event
When detecting composite events,
algebra.
there may be several event occurrences
The range of event operators varies (of the same event type) that could be
from system to system. The most com- used to form a composite event. As an
mon are: disjunction—E 1 orE 2 occurs example, consider a composite event CE
when either E 1 or E 2 has occurred; con- which is the sequence of events EV1
junction—E 1 andE 2 happens when both and EV2. If two occurrences of event
E 1 and E 2 have occurred in any order; EV1, first ev1 and later ev19, have al-
sequence—seq(E 1 , E 2 ) occurs when E 1 ready been signaled, and an occurrence
occurs before E 2 ; closure—closure E in of event EV2 (e.g., ev2) is now pro-
Int is raised only once the first time E is duced, there is a question as to what
signaled, regardless of later occurrences instances of CE should be raised. Possi-
of E in the time interval Int; history— bilities include sequence(ev1, ev2) or se-
times(n, E) in Int is signaled when quence(ev19, ev2) or sequence(ev1, ev2) ø
event E occurs n times during the time sequence(ev19,ev2). The alternatives are

ACM Computing Surveys, Vol. 31, No. 1, March 1999


70 • N. W. Paton and O. Dı́az

distinguished using consumption pol-


icies. In Chakravarthy et al. [1994]
four possible consumption policies are
introduced: a recent context, which
considers the most recent set of events
that can be used to construct the compo-
sition (in the previous example, sequen-
ce(ev19, ev2) is detected when ev2 arises,
after which ev19 and ev2 are no longer
considered for the detection of CE); a
chronicle context, which consumes the Figure 3. The context within which a rule is
processed.
events in chronological order (sequen-
ce(ev1, ev2) is signaled when ev2 arises,
after which ev1 and ev2 are no longer
considered for the detection of CE); a 3.2 Condition
continuous context, which defines a
sliding window and starts a new compo- The Role of a condition indicates
sition with each primitive event that whether it must be given. In ECA-rules,
takes place (two sequence events would the condition is generally optional.
begin to be constructed when ev1 and When no condition is given for an ECA-
rule, or where the role is none, an
ev19 arise, and both sequence events
event-action rule results. In systems in
would be signaled as ev2 is detected);
which both the event and the condition
and a cumulative context, which accu-
are optional, it is always the case that
mulates all the primitive events until
at least one is given.
the composite event is finally raised (a
The Context indicates the setting in
sequence event is signaled only once which the condition is evaluated. The
when ev2 arises, where the first param- different components of a rule are not
eter of the sequence includes the pa- evaluated in isolation from the database
rameters of all the occurrences of EV1, or from each other, and furthermore
i.e., ev1 and ev19).1 The rationale for they may not be evaluated in quick suc-
each context can be found in Chakra- cession, as described in Section 4. As a
varthy et al. [1994]. result, the processing of a single rule
The Role of an event indicates can potentially be associated with at
whether events must always be given least four different database states:
for active rules, or whether the explicit DB T —the database at the start of the
naming of an event is unnecessary. If current transaction; DB E —the database
the role is optional, then when no when the event took place; DB C —the
event is specified condition-action rules database when the condition is evalu-
are supported, which have significantly ated; and DB A —the database when the
different functionality and implementa- action is executed. Active rule systems
tions from event-condition-action (ECA) may support facilities within the condi-
rules, as described in Section 7.5. If the tion of a rule that allow it to access zero
role is none then events cannot be spec- or more of the states DB T , DB E , and
ified, and all rules are condition-action DB C , and may also provide access to
rules. If the role is mandatory then bindings associated with the event
only ECA-rules are supported. (BindE ). The availability of information
to the different components of a rule is
illustrated in Figure 3. In general, the
position is even more complex than that
1
Unlike the continuous context, an event occur-
portrayed in Figure 3, as the state be-
rence does not participate in more than one com- fore and after an event has taken place
posite computation in the cumulative context. may be different, and as multiple rules

ACM Computing Surveys, Vol. 31, No. 1, March 1999


Active Database Systems • 71

may be triggered and may execute to is deleted and the system manager is
completion during the execution of a informed:
single action. As an example of the util-
on delete to Holder
ity of such information, the following
if delete.value . 0
rule is used to respond to the situation do ^inform system manager&
in which the value of the stock held by
a Holder drops to 0. The Context of the action is similar
to that of the condition, and indicates
on update to value of Holder the information that is available to the
if new.value 5 0 action, as illustrated in Figure 3. It is
do ^action&
sometimes possible for information to be
In this rule, information from the event passed from the condition of a rule to its
(DB E ) is used to identify when the action as DB E or BindC . As an example
value field has been set to 0, so that an of the utility of context information, the
appropriate response can be made (e.g., following rule is used to revise the data
the Holder is deleted, information on stored in the value attribute of all
the Holder is sent to the fund manager, Holder tuples that are affected by a
etc.). In other examples in this survey, change in the price of some Stock.
conditions or actions access event pa- on update to price of Stock
rameters using old to refer to the value if true
that a data item held before an event do update Holder
updated it, insert to refer to a newly set value 5 value p (new.
inserted value, delete to refer to a price/old.price)
recently deleted value, and update to where reg# in (select reg#
refer to attributes of a data item that from Owns where stock# 5
were unaffected by an update event. update.stock#)
In this rule, both the old and the new
3.3 Action values of the price have to be accessed
(DB E ), as does the state of the database
The range of tasks that can be per- at the time of the update (DB A ).
formed by an action is specified as its
Options. Actions may update the
4. EXECUTION MODEL
structure of the database or rule set,
perform some behavior invocation The execution model specifies how a set
within the database or an external of rules is treated at runtime, and is
call, inform the user or system admin- characterized by the dimensions pre-
istrator of some situation, abort a sented in Table II. Although the execu-
transaction, or take some alternative tion model of a rule system is closely
course of action using do-instead related to aspects of the underlying
[Stonebraker et al. 1990]. As an exam- DBMS (e.g., data model, transaction
ple of do-instead, if an attempt was manager), there are a number of phases
made to delete a tuple from the Holder in rule evaluation, illustrated in Figure
relation that has a value . 0, then 4, that transcend considerations that
rather than allow the operation to pro- relate to specific software environ-
ceed, the system manager could be in- ments.
formed of the attempted operation:
(1) The signaling phase refers to the
on delete to Holder appearance of an event occurrence
if delete.value . 0 caused by an event source.
do instead ^inform system man-
ager&
(2) The triggering phase takes the
events produced thus far, and trig-
This is in contrast with the more gers the corresponding rules. The
standard semantics, in which the tuple association of a rule with its event

ACM Computing Surveys, Vol. 31, No. 1, March 1999


72 • N. W. Paton and O. Dı́az

Table II. Dimensions for the Execution Model

Figure 4. Principal steps that take place during rule execution.

occurrence forms a rule instantia- (condition) of the rule, but not neces-
tion. sarily at the earliest opportunity.
(3) The evaluation phase evaluates the Normally, further processing is left
condition of the triggered rules. The until the end of the transaction. How-
rule conflict set is formed from all ever, some authors [Diaz and Jaime
rule instantiations whose conditions 1997] have also proposed to have a
are satisfied. user-invoked coupling mode whereby
(4) The scheduling phase indicates how the condition (action) is evaluated (ex-
the rule conflict set is processed. ecuted) at a user-specified time after
the event (condition) has been sig-
(5) The execution phase carries out the
naled (evaluated). A similar effect is
actions of the chosen rule instantia-
also supported by Starburst [Widom
tions. During action execution other
and Finkelstein 1990] where users
events can in turn be signaled that
can invoke rule processing within a
may produce cascaded rule firing.
transaction by issuing special com-
These phases are not necessarily exe- mands: the process rules, process
cuted contiguously, but depend on the ruleset S, and process rule R com-
Event-condition and Condition-ac- mands invoke rule processing for the
tion coupling modes. The former deter- whole triggering rule set, a given sub-
mines when the condition is evaluated set S, or a unique rule R, respec-
relative to the event that triggers the tively; and
rule. The Condition-action coupling —detached, in which case the condi-
mode indicates when the action is to be tion (action) is evaluated (executed)
executed relative to the evaluation of within a different transaction from
the condition. The options for coupling the event (condition). The execution of
modes most frequently supported are: the action can be dependent upon or
independent of the committing of the
—immediate, in which case the condi-
transaction in which the event took
tion (action) is evaluated (executed)
place or the condition was evaluated.
immediately after the event (condi-
tion); The nature of the relationship be-
—deferred, in which case the condition tween events and the rules they trigger
(action) is evaluated (executed) within is partially captured by the transition
the same transaction as the event granularity. This indicates whether

ACM Computing Surveys, Vol. 31, No. 1, March 1999


Active Database Systems • 73

the relationship between event occur- allow responses to be made to events


rences and rule instantiations is 1:1 or signaled by those conditions or actions.
many:1. When the transition granu- By contrast, if the Cycle policy is recur-
larity is tuple, a single event occur- sive, events signaled during condition
rence triggers a single rule. When the and action evaluation cause the condi-
transition granularity is set, a collec- tion or action to be suspended, so that
tion of event occurrences are used to- any immediate rules monitoring the
gether to trigger a rule. For example, if events can be processed at the earliest
a rule R with a condition-action cou- opportunity. In practice, a recursive cy-
pling mode of deferred is monitoring cle policy is only likely to be considered
an event E, and occurrences e 1 , e 2 , and in systems that support immediate rule
e 3 of E have taken place during a trans- processing, and some systems support a
action, then the transition granularity recursive cycle policy for immediate
indicates how many instantiations of R rules and an iterative cycle policy for
are created by the triggering phase. If deferred rules.
the transition granularity is tuple, The Scheduling phase of rule evalu-
then a separate instantiations of R is ation determines what happens when
created for each of e 1 , e 2 , and e 3 ; if the multiple rules are triggered at the same
transition granularity is set, then a time. The two principal issues are as
single instantiation of R is created to follows.
respond to the set of events {e 1 , e 2 , e 3 }.
Another feature that influences the
—The selection of the next rule to be
relationship between events and the
fired. This topic has received much
rules they trigger is the Net effect pol-
attention in the expert system com-
icy, which indicates whether the net
munity as it is seen as fundamental to
effect of the event occurrences rather
understanding and controlling the be-
than each individual event occurrence
should be considered. The difference be- havior of a set of rules [Winston
tween the two strategies stems from 1984]. Indeed, rule order can strongly
cases in which several updates on the influence the result and reflects the
same data item can be considered as a kind of reasoning followed by the sys-
single update: if an instance is updated tem. Examples of well-known Dy-
and then deleted, the net effect is dele- namic approaches (referred to as con-
tion of the original instance; if an in- flict resolution policies) are those that
stance is inserted and then updated, the prioritize rules based on either the
net effect is the insertion of the updated recency of update (i.e., the time of
instance; if an instance is inserted and event occurrence) or the complexity of
then deleted, the net effect is no modifi- the condition. The former makes the
cation at all [Hanson 1992]. system focus on a line of reasoning,
The question of what happens when since the most recently modified data
events are signaled by the evaluation of are those associated with the most
the condition or action of a rule is ad- recently fired rule (i.e., the search
dressed by the Cycle policy of the exe- space is traversed depth-first). The
cution model. In general, there are two latter reflects the assumption that
options. If the Cycle policy is iterative, condition complexity indicates the
then events signaled during condition specificity of the rule (i.e., the extent
and action evaluation are combined to which the rule fits the current sit-
with those from the original event uation). However, mechanisms avail-
source illustrated in Figure 4, and are able in active database systems that
subsequently consumed by rules from have to cope with large quantities of
this single global repository of signaled data efficiently in a context where
events. This means that condition or deterministic behavior is held to be
action evaluation is never suspended to highly desirable tend to support prior-

ACM Computing Surveys, Vol. 31, No. 1, March 1999


74 • N. W. Paton and O. Dı́az

Table III. Dimensions for Rule Management

ity schemes in which rules are associ- of them supported by a rule), but only
ated with a priority statically. one is used.
Static priorities are often determined A further aspect to be considered is
either by the system (e.g., based on rule how Error handling is supported dur-
creation time) or by the user as an ing rule firing. Most systems simply
attribute of the rule. In the latter case, abort the transaction, as this is stan-
a rule is selected from a collection of dard behavior in databases. However,
simultaneously fired rules for execution other alternatives may be more conve-
using a Priority mechanism. Rules can nient [Hanson and Widom 1993]: to ig-
be placed in order using a numerical nore the rule that raised the error and
scheme, in which each rule is given an to continue processing other rules; to
absolute value that is its priority backtrack to the state when rule pro-
[Stonebraker et al. 1990], or by indicat- cessing started and either restart rule
ing the relative priorities of rules by processing or continue with the transac-
stating explicitly that a given rule must tion; to adopt some contingency plan
be fired before another when both are that endeavors to recover from the error
triggered at the same time [Agrawal et state, possibly using the exception
al. 1991]. mechanism of the underlying database
—The number of rules to be fired. Possi- system.
ble options include (1) to fire all rule
instantiations sequentially; (2) to 5. MANAGEMENT
fire all rule instantiations in paral-
lel; (3) to fire all instantiations of a Sections 3 and 4 have, respectively, de-
specific rule before any other rules scribed the structural characteristics of
are considered, which is known as individual active rules and the runtime
firing a rule to saturation; and (4) to evaluation of sets of such rules. This
fire only one or some rule instantia- section considers the facilities provided
tion(s). Which approach is most ap- by the system for managing rules, spe-
propriate depends upon the task that cifically what operations can be applied
is being supported by the rule. The to rules, how rules are themselves rep-
first alternative is suitable for rules resented, and programming support for
supporting integrity maintenance: an rules. Possible dimensions are shown in
update is successful once all con- Table III.
straints have been validated. The sec- The Description of rules refers to
ond option is described in HiPAC in a how rules themselves are normally ex-
bid to encourage more efficient rule pressed using a database program-
processing. The third option is most ming language [Gehani et al. 1992;
popular among expert-system practi- Buchmann et al. 1995], a query lan-
tioners, as it yields more focused in- guage [Widom and Finkelstein 1990;
ference than the other approaches. Stonebraker et al. 1990], or as objects
The fourth option can be of use to in an object-oriented database [Dayal et
support derived data—different deri- al. 1988; Diaz et al. 1991]. These catego-
vation criteria may be available (each ries are not exclusive. For example, it is

ACM Computing Surveys, Vol. 31, No. 1, March 1999


Active Database Systems • 75

possible for an extended query language mount importance if active rules are to
facility in an object-oriented database to be adopted as a mainstream implemen-
arrange for rules to be stored as objects. tation technology in business environ-
Besides creation and deletion, which ments. Important facilities for support-
are taken to be mandatory, other Oper- ing the developers of rule bases include
ations commonly found are activate, the ability to query the rule base and to
deactivate, and signal. Activation (de- trace or in some other way monitor rule
activation) of rules makes the system system behavior. Support for applica-
start (stop) monitoring the rule’s event tion development is discussed more
or condition. Since rules can persist for fully in Section 8.
long periods, this mechanism helps the
database administrator to temporarily 6. ACTIVE RULE SYSTEMS
switch on (off) some rules without delet-
ing them. Among other things, such de- The previous three sections have intro-
activation mechanisms may be conve- duced many of the principal features of
nient for improving efficiency, for active database systems, and together
debugging, or for loop prevention (e.g., constitute a framework within which
by deactivating rules once they have active functionality can be described. In
been fired). This mechanism may be this section the framework is applied to
available for individual rules as well as the presentation of a range of promi-
for rule sets. The latter can help in nent proposals for active database sys-
structuring the rule base, as well as tems, thereby highlighting important
speeding up rule processing. similarities and differences.
The operation Signal is required to
support abstract events, and is invoked 6.1 Relational Systems
explicitly by the application to notify
the rule system of external occurrences. The inclusion of active behavior model-
Although all active DBMSs support ing facilities in relational databases is
creation and deletion of rules, they can not particularly new, and most commer-
differ in the level of Adaptability sup- cial systems include triggering mecha-
ported. In some systems it is only possi- nisms. In addition, a number of re-
ble to change the rules associated with search prototypes have been developed
an application by recompiling the appli- that seek to provide more comprehen-
cation code, and thus the rules can be sive support for active rules. Proposals
modified only at compile time. Others for including active behavior in rela-
support more dynamic run time rule tional systems often have a range of
modification, including the ability of common characteristics, which stem
rule actions to modify the rule base. from the nature of the underlying pas-
Clearly there is a sliding scale of de- sive database system. For example,
grees of Adaptability: in the context of rules are generally triggered by system-
the dimensions, any system that allows defined operations on the structure of
rules to be created without recompiling the database (e.g., insert a tuple, modify
application code can be considered to a tuple), because until recently, rela-
support run time adaptability. tional systems have rarely supported
There is an extent to which the Data user-defined operations. It can be antic-
Model with which an active rule system ipated that future active rule systems
is associated is independent of the other for relational databases will be ex-
dimensions of rule system functionality. tended so that primitive events include
However, the data model is likely to the execution of stored procedures, but
significantly influence the designers of such functionality is not supported by
an active rule system, and is thus in- the systems reviewed here. Further-
cluded as a dimension. more, because relational languages such
Programmer Support is of para- as SQL provide facilities for expressing

ACM Computing Surveys, Vol. 31, No. 1, March 1999


76 • N. W. Paton and O. Dı́az

Table IV. Dimensions Applied to Active Relational Database Systems

conditions and for performing updates, for the inclusion of active behavior into
the rule description language is often an relational systems, namely Starburst,
extension of the query language. In gen- POSTGRES, Ariel, and SQL-3, fit into
eral, active mechanisms proposed for the framework introduced in the previ-
relational databases support only one or ous three sections. The following sub-
a limited range of coupling modes, and sections describe distinctive features of
have limited support for composite these proposals. Other examples of ac-
event detection. This, however, is not tive extensions to systems with largely
because of any fundamental restrictions relational data models are presented in
imposed by the relational model, and Kotz et al. [1988], Kiernan et al. [1990],
extended proposals may emerge in due Zaniolo [1994], Harrison and Dietrich
course. [1994], Bayer and Jonker [1994], and
Table IV indicates how four proposals Reddi et al. [1995].

ACM Computing Surveys, Vol. 31, No. 1, March 1999


Active Database Systems • 77

6.1.1 Starburst. The Starburst ac- to lead to rule sets that are difficult to
tive rule system adds active functional- understand and maintain.
ity to an extensible relational database
6.1.2 POSTGRES. The active rule
system [Widom and Finkelstein 1990],
system is only one of a number of exten-
and has been used as a testbed for a
sions to the relational model supported
number of database internal applica-
within POSTGRES [Stonebraker and
tions, including integrity constraints
Kemnitz 1991], with others facilitating
[Ceri et al. 1990] and materialized the representation of objects and user-
views [Ceri and Widom 1991]. defined operations. The POSTGRES
Perhaps the most noteworthy feature rule system is considered within the
of the Starburst rule system is its set- section on relational databases because
based execution model, in which rules the object-oriented features of POST-
are triggered by the net effect of a set of GRES seem to have had little bearing
changes to the data stored in the data- on the design of the rule system. The
base. When an operation takes place POSTGRES rule system, like that of
that is being monitored by a rule, the Starburst, can be considered to be quite
nature of the change is logged in a conservative, although a key distinction
transition table. Entries in such tables is that the POSTGRES rule system is
can then be revised to take account of tuple-oriented. Furthermore, the conse-
subsequent update operations; for ex- quences of an event being raised take
ample, if a tuple is inserted and then effect immediately, rather than being
updated, the net-effect is logged as an deferred until a later rule assertion
insert of the updated tuple; if a tuple is point.
inserted and then deleted, the net-effect
is that no operation has taken place. 6.1.3 Ariel. An important character-
The information that is stored in transi- istic of Ariel that distinguishes it from
tion tables is used to trigger rules at Starburst or POSTGRES is the option-
rule assertion points, that may take ality of the event—Ariel principally sup-
place either during or at the end of a ports condition-action rules. The conse-
transaction. In this context, events do quences of this distinction for the
not trigger rules directly. Rather, the implementation of rule systems is con-
sidered in Section 7.5.
fact that an event has occurred is re-
The suitability of condition-action
corded in a transition table for subse-
rules compared with ECA-rules depends
quent consideration, and the timing or
upon the context. There are circum-
order of specific events is not taken into
stances in which it is necessary to make
account by the scheduler.
the event part of a rule explicit to cap-
Each rule that is monitoring a partic- ture the semantics of an application. In
ular event has access to the net-effect of the example application from Section 2,
all updates of relevance to that event, there might be a general policy that no
and that have not already been consid- more than 10% of the total value of the
ered by the rule; when a rule is fired stock owned by Cautious Investments
multiple times within a single transac- should be of the one kind. This could be
tion, the changes it has access to are captured by a condition-action rule
those that have taken place since the thus.
last firing of the rule.
The Starburst rule system can be con- if h.name 5 “Cautious Invest-
sidered to be conservative in its design, ments”
and h.reg# 5 o.reg#
in that a modest and fixed set of facili- and
ties is supported. However, the seman- o.stock# 5 s.stock# and
tics of rule execution in Starburst is still o.qty p s.price . 0.1 p
quite complex, and it can be argued that h.value
supporting many more facilities is likely from h in Holder, o in Owns,

ACM Computing Surveys, Vol. 31, No. 1, March 1999


78 • N. W. Paton and O. Dı́az

s in Stock and condition-action rules, Ariel can be


do ^reduce quantity of s owned said to offer the best of both worlds in
by h& contexts such as the preceding.
However, this rule would have the 6.1.4 SQL-3. Most commercial rela-
effect of selling a particular kind of tional databases support trigger mecha-
stock without regard for the reason that nisms. However, the knowledge and ex-
its value had increased relative to the ecution models of these mechanisms
total value held by Cautious Invest- have traditionally differed from system
ments. It may be preferable to distin- to system. With a view to providing
guish between the different events that more consistent support for active
caused the condition to go true using mechanisms in relational systems, trig-
ECA-rules. For example, if the condition gers are included in the emerging
became true as a result of the purchase SQL-3 standard [Kulkarni et al. 1999].
of more of the stock, then the update This survey features the standard
may be blocked. By contrast, if the con- rather than any of the current commer-
dition became true as a result of an cial systems, as it is expected that the
increase in the price of the stock, then commercial systems will drift towards
the portfolio manager could be warned, the standard in due course.
but no action taken. These approaches The SQL-3 standard, like many com-
can be supported by the following rules. mercial systems, supports both row-
level triggers (with a transition granu-
on update to qty of Owns larity of tuple) and statement-level
if h.name 5 “Cautious In-
vestments” and
triggers (with a transition granularity
h.reg# 5 new.reg# and of set). Statement-level triggers are exe-
new.stock# 5 s.stock# and cuted once in response to an update
new.qty p s.price . 0.1 p operation on a table, no matter how
h.value many tuples are affected by the update.
from h in Holder, s in Stock However, perhaps the most important
do abort feature of the SQL-3 standard is that it
makes explicit how triggers are to inter-
on update to price of Stock act with other features found in rela-
if h.name 5 “Cautious In- tional databases, and in particular, de-
vestments” and
h.reg# 5 o.reg# and
clarative integrity-checking mechanisms.
o.stock# 5 new.stock# and
o.qty p new.price . 0.1 p 6.2 Object-Oriented Systems
h.value Object-oriented databases (OODBs), un-
from h in Holder, o in Owns
do ^inform portfolio manager&
like their relational predecessors, have
always supported a close association of
Thus ECA-rules can be considered to user-defined behavior with database
describe the context of a rule in a more data. Such behavior is generally ex-
precise way than condition-action rules. pressed as methods attached to the
This may not, however, always be to the classes that structure the data stored in
advantage of programmers using a rule the database. This, plus the hiding of
system. For example, to describe the certain aspects of the structure of an
situation captured by the preceding con- object using encapsulation, means that
dition-action rule using ECA-rules, certain of the tasks that may be per-
events would have to be defined that formed by active behavior in relational
monitor the insertion of tuples into the databases are supportable using
Owns table, changes to the reg# at- method code in object-oriented systems.
tribute of Owns and Holder, updates to Despite this, proposals for active exten-
the value attribute of Holder, and so sions to OODBs abound, with early pro-
on. Thus, by providing both ECA-rules posals being made only a few years after

ACM Computing Surveys, Vol. 31, No. 1, March 1999


Active Database Systems • 79

the first work on passive OODBs. This used to store the ECA-rules of the active
rapid and extensive research activity extension. Further distinctive features
has probably been encouraged by the of HiPAC are the parallel execution of
tendency for OODBs to be used in ad- triggered rules as subtransactions, the
vanced applications, where the need for extension of the query algebra with a
comprehensive behavior management changes operator that allows access to
facilities is greater than in more tradi- delta relations that monitor the net ef-
tional domains. Furthermore, the na- fect of a set of changes, and identifica-
ture of certain applications has encour- tion of real-time applications that can
aged investigation of active database benefit from active database facilities.
constructs that are significantly more
6.2.2 EXACT. EXACT, an extensi-
powerful than those described for rela-
ble active rule manager [Diaz et al.
tional systems in Table IV, as shown for
1991; Diaz and Jaime 1997], adds active
selected systems in Tables V and VI. As
facilities to the OODB ADAM, in which
well as being more powerful than most
instances, classes, rules, and events are
extensions to relational databases, a
represented uniformly as database ob-
common difference is that primitive
jects. Two contentions support this
events in active OODBs are often asso-
work, specifically: that control informa-
ciated with method invocations rather
tion rarely refers to single rules but to
than access to or update of structure.
sets of rules, and that rules supporting
This partly derives from the desire to
different applications often require dif-
avoid reducing data independence by
ferent execution models. To support
linking active behavior to structure di-
these contentions, EXACT provides an
rectly, and partly from the fact that
extensible rule model in which collec-
some systems use layered architectures
tions of rules can be developed that
in which it is not straightforward to
share similar features, the functional-
raise events on the basis of structure
ities of which are described by specializ-
operations.
ing the general rule management facili-
The following subsections outline the
ties provided with the system. EXACT
principal features of eight projects de-
has been used for experimentation in
veloping active object-oriented data-
the development of advanced database
bases, four of which are not based upon
facilities [Diaz 1992; Paton et al. 1993;
persistent C11 systems (HiPAC, EX-
Diaz et al. 1994].
ACT, NAOS, and Chimera, as featured
in Table V), and four of which are based 6.2.3 NAOS. NAOS [Collet et al.
on database extensions of C11 (Ode, 1994] is an active rule system for the O2
SAMOS, Sentinel, and REACH, as fea- commercial OODB [Deux et al. 1990].
tured in Table VI). Other examples of As NAOS has been implemented as part
active extensions to OODBs are pre- of the kernel of O2, rather than as a
sented in Dittrich [1993], Etzion et al. layer on top that has not been sanc-
[1994], Naqvi and Ibraham [1994], tioned by the vendor, it may develop
Thomas and Jones [1995], and Dinn et into the first commercially available ac-
al. [1996]. tive OODB.
As O2 provides comprehensive sup-
6.2.1 HiPAC. The HiPAC project port for two languages, O2C and OQL,
[Dayal et al. 1988; Chakravarthy 1989; NAOS has been able to exploit this to
Dayal 1989] pioneered many of the most provide declarative expression of condi-
important ideas in active databases, tions using OQL and powerful action
such as coupling modes and composite expression using O2C. The execution
events, although the resulting design model of NAOS is slightly unusual, in
was not fully implemented. HiPAC was supporting depth-first, recursive pro-
associated with the passive OODB cessing of immediate rules, but breadth-
PROBE, and objects in this model were first, iterative processing of deferred

ACM Computing Surveys, Vol. 31, No. 1, March 1999


80 • N. W. Paton and O. Dı́az

Table V. Dimensions Applied to Active Object-Oriented Systems

rules. The NAOS rule system has been and is also being used for experimental
formally specified using denotational work on optimization [Collet and Man-
semantics [Coupaye and Collet 1995], chado 1995].

ACM Computing Surveys, Vol. 31, No. 1, March 1999


Active Database Systems • 81

Table VI. Dimensions Applied to Active Object-Oriented Systems Based on C11

6.2.4 Chimera. The Chimera [Ceri deductive language for condition expres-
et al. 1996] active rule system is unique sion encourages a set-oriented view of
among those surveyed here in building rule processing, and information is
upon a deductive object-oriented data- passed from the event to the condition
base (another such system is described by querying an event history. Another
in Dinn et al. [1996]). The use of the unusual feature of Chimera is that rule

ACM Computing Surveys, Vol. 31, No. 1, March 1999


82 • N. W. Paton and O. Dı́az

conditions and actions can access past condition becomes true, its action is ex-
database states, either at the start of ecuted. Once signaled, triggers declared
the current transaction, or when the as once-only are automatically deacti-
rule was last fired. Chimera is imple- vated whereas those declared as perpet-
mented by compiling user statements ual are reactivated automatically. The
into an internal form that is interpreted user can explicitly deactivate a trigger
by a runtime system that stores both using the command deactivate. Unlike
database and rule system data using constraints, triggers with a condition
the ALGRES extended relational stor- that has evaluated to true are executed
age manager. in a separate transaction after the cur-
rent transaction has committed (i.e., the
6.2.5 Ode. The Ode database system event-condition coupling mode is imme-
is defined and manipulated using the diate, whereas the condition-action cou-
O11 database programming language, pling mode is detached dependent).
which extends C11 with database facil- Note that the processing supported by
ities (e.g., persistence, versions). It pro- triggers in Ode is quite distinctive, and
vides two categories of rules that are open to interpretation in different ways.
semantically divided into constraints Here, triggers have been considered as
and triggers, each with a different syn- condition-action rules, but an equally
tax and execution model [Gehani and valid interpretation is that they are
Jagadish 1991]. Although triggers can, event-action rules in which the event is
in general, be used to support con- defined using a rich event algebra and
straints, the authors argue that the dis- Boolean expressions, known as masks.
tinction clarifies the role that is being
played, and facilitates more efficient im- 6.2.6 SAMOS. SAMOS [Gatziu et
plementation. Both constraints and al. 1991; Gatziu and Dittrich 1994] pro-
triggers are defined at the class level, vides active facilities on top of the Ob-
and are subject to inheritance like other jectStore commercial OODB. As the de-
properties of a class. velopers of SAMOS did not have access
A constraint consists of a predicate on to the source of ObjectStore, the active
the state of an object and a single action system is implemented as a layer on top
to be executed if the condition becomes of ObjectStore, rather than as part of
false. Once the action has been exe- the kernel.
cuted, the system checks the condition Perhaps the most significant feature
again. If it is still false, the transaction of SAMOS is its event detector, the se-
is aborted. As for the event-condition mantics of which is based upon Petri
coupling modes, different options are nets, and which, in turn, is imple-
supported depending on whether con- mented using a graph structure that
straints should be checked immediately reflects the structure of the Petri net.
(declared as hard constraints), or de- The event language itself presents users
ferred until the end of transaction (de- with a series of operators that are
clared as soft constraints). Multiple up- shared by other systems with compre-
dates affecting the same hard hensive event languages, such as
constraint in the course of a transaction HiPAC [Dayal et al. 1988], Sentinel
cause the constraint to be evaluated [Chakravarthy et al. 1994], or REACH
once after each update, whereas for a [Buchmann et al. 1995].
soft constraint the check is only carried
out once at the end of the transaction. 6.2.7 Sentinel. Sentinel [Chakra-
Constraints affect all instances of a varthy et al. 1994] is an active exten-
class, and are permanently activated. sion to the C11 based OpenOODB sys-
Unlike constraints, triggers have to tem from Texas Instruments [Wells et
be explicitly activated on particular ob- al. 1992]. The focus in this project has
jects. If a trigger is active, then when its been upon the provision of comprehen-

ACM Computing Surveys, Vol. 31, No. 1, March 1999


Active Database Systems • 83

Figure 5. Abstract active rule system architecture.

sive event specification mechanisms, executes in a separate transaction from


representation of rules as database ob- its triggering event only after the trig-
jects, and integration of the rule system gering transaction commits, and exclu-
with a sophisticated transaction man- sive causally dependent, in which a rule
ager. In particular, the consumption executes in a separate transaction from
modes that are now widely accepted as its triggering event only after the trig-
providing appropriate descriptions of gering transaction aborts.
how to construct parameters to compos-
ite events in rule systems with tuple- 7. ARCHITECTURAL ISSUES
level transition granularities were first
implemented in Sentinel. This section considers how some of the
characteristics of active database sys-
6.2.8 REACH. REACH [Buchmann tems presented in the foregoing sections
et al. 1995] has much in common with can be implemented. In addressing cer-
Sentinel in that it too is an active exten- tain issues, reference is made to the
sion to OpenOODB. The emphasis in abstract architecture of an active data-
the REACH project has been on devel- base system presented in Figure 5. This
oping a comprehensive understanding figure makes explicit the principal pro-
of how the rule manager interacts with cesses (rectangles) and data stores (el-
complex transaction models, with a lipses) used to implement the function-
view to supporting open applications ality illustrated in Figure 4.
[Branding et al. 1994]. Examples of cou- The principal processes are as follows.
pling modes supported in REACH with
open applications in mind are sequen- (1) The Event Detector ascertains
tial causally dependent, in which a rule what events of interest to the rule

ACM Computing Surveys, Vol. 31, No. 1, March 1999


84 • N. W. Paton and O. Dı́az

system have taken place, if any. upon performance and limit what func-
Primitive events are notified from tionality can be supported in terms of
the database or from external sourc- primitive event detection, coupling
es; composite events are constructed modes, and optimization.
from incoming primitive events plus
information about past events that Integrated. The active component is
can be obtained from the history. developed by changing the source of an
existing passive database system. This
(2) The Condition Monitor evaluates
approach frees the designer of the active
the conditions of rules associated
database system from the limitations of
with events that have been detected
the layered approach, and is probably
by (1). In systems that support con-
the preferred model for developing in-
dition-action rules, there is no ex-
dustrial-strength systems. It is worth
plicit statement of the events to be
noting, however, that the number of re-
monitored, although actual imple-
quired changes to the kernel of a system
mentations do have to monitor prim-
to allow it to support active capabilities
itive events. The distinctive imple-
effectively is often not large, and that
mentation strategies that are often
practical systems can be developed us-
used in such systems are considered
ing largely layered software, with a
in Section 7.5.
small number of hooks into the kernel.
(3) The Scheduler compares recently
triggered rules with those that have The first systematic performance
previously been triggered, updates evaluation of different active database
the conflict set, and fires any rules systems and architectures is provided
that are scheduled for immediate by Geppert et al. [1998]. The following
processing. subsections address a range of imple-
(4) The Query Evaluator executes da- mentation issues in more detail.
tabase queries or actions. Access
may be required both to the current 7.1 Event Detection
state of the database and to past There are two principal aspects to the
states in order to support monitor- implementation of event detection—the
ing of how the database is evolving. monitoring of primitive events and the
The functionality of each of the preced- accumulation of information that is of
ing components depends very much on relevance to composite events.
the knowledge and execution models of The detection of primitive events nor-
the active database system to be sup- mally involves some form of check
ported, which in turn are influenced by within the kernel of the database sys-
the environment within which the ac- tem, a characteristic that means it is
tive database is being developed. Archi- often not possible for active functional-
tecturally, two principal categories of ity to be implemented as a layer on top
active database can be identified. of an existing database system. For ex-
ample, to detect that an update has
Layered. The active component is been made to a tuple in a relation, it is
developed as a layer of software on top necessary for the update operation of
of an unchanged passive database sys- the database system to be able to iden-
tem. This approach has the advantage tify which primitive events are associ-
that no access is required to the source ated with the specific update being per-
code of the passive database system, formed. As a further example, in object-
and that the resulting active system oriented databases events are often
may be easily portable for use with dif- raised in response to the invocation of
ferent passive systems. However, the user-defined methods, in which case the
lack of access to the kernel of the under- event detector must be notified of mes-
lying database may have an impact sage-sending events by the method dis-

ACM Computing Surveys, Vol. 31, No. 1, March 1999


Active Database Systems • 85

patcher. Specific techniques for detect-


ing primitive events in object-oriented
systems are discussed in Dittrich
[1993], Gatziu and Dittrich [1994],
Chakravarthy et al. [1994], and Kim et
al. [1992]. Broadly speaking, this can be
achieved using a sender-based, receiver-
based, or dispatcher-based mechanism
[Fernandez and Diaz 1995]. The first
does not really lead to active systems,
as event detection is undertaken by the
application rather than the DBMS it-
self. The application is changed wher-
ever the relevant message is sent. As
well as being intrusive, the main draw-
back of this approach is that detection is Figure 6. Example of Sentinel event graph.
replicated, distributed, and embedded
in application programs, thus jeopardiz-
ing encapsulation and maintenance. timespan within which the event is to
The receiver-based approach is be detected expires. For composite
mainly based on wrappers: a monitored events whose components are primitive
message must activate an operation events that have originated within the
that extends the original code provided boundaries of a single transaction, the
by the user with the associated signal to end of the transaction marks the end of
the event detector. This extra code is the monitoring period, and all partially
called a wrapper since it is typically composed events can be removed. If the
executed before and/or after the original source transaction is not relevant, so
method. The receiver-based approach is that a composite event can be formed by
generally found in layered architec- events that originate in different trans-
tures, as primitive event detection can actions, a validity interval is required.
be implemented by preprocessing appli- This may be given either for the whole
cation programs, and thus changes to composite event, or it may be deter-
the kernel of the database are not re- mined by the smallest validity interval
quired. of the composing events [Buchmann et
By contrast, dispatcher-based mecha- al. 1995].
nisms offer a general solution by placing A range of different structures has
the signaling code inside the database been proposed for implementing com-
system itself. Such mechanisms can be posite events along with event algebras.
used to monitor a range of aspects of For example, Gatziu and Dittrich [1994]
system behavior, including transaction describe the use of colored Petri nets for
operations, structural primitives, and specifying and implementing an event
behavior invocations. As this approach detector, whereas Gehani et al. [1992]
requires changes to the kernel of the use finite state automata, and Chakra-
database, it is found only in systems varthy et al. [1994] use an event graph
with integrated architectures. that is linked directly to the query
As for composite event detection, it graph used to express the condition of
involves recording information on all the corresponding rule. As an example
partially detected composite events that of how information on partially detected
may become fully detected in the future. events is accumulated, Figure 6 shows
For example, in the composite event E 1 the event graph that would be used to
and E 2 , if E 1 has taken place but E 2 has describe the event E 1 and E 2 or E 3 . As
not, then this fact must be recorded events take place, the event graph is
until E 2 either does take place or the decorated with instances of primitive

ACM Computing Surveys, Vol. 31, No. 1, March 1999


86 • N. W. Paton and O. Dı́az

events that are then consumed as com- may also have access to past states of
posite events are detected. For the ex- the database. For example, in Starburst
ample, in Figure 6, in all event con- [Widom et al. 1991] a transition log
sumption modes except Recent records how tables have changed during
mentioned in Section 4, if N occurrences a transaction, which supports access
of E 1 are raised before any occurrences from the condition of the rule to the
of E 2 , then all N occurrences of E 1 must accumulated changes associated with
be stored in anticipation of the subse- the event that has triggered the rule. A
quent raising of some matching occur- comparable mechanism is required by
rences of E 2 . Such a process can be very any system that supports rule process-
expensive, and in practice care must be ing based upon the net effect of a set of
taken in the design and use of compos- accumulated changes. The contents of
ite event detectors to ensure that the the history in a specific rule system
history datastore in Figure 5 does not thus depend upon the nature of the
become extremely large. event specification language supported,
plus the scope of access to past database
7.2 Condition Monitoring states from the condition/action of the
rule.
The event combined with the condition Some condition languages are based
describes the situation that an ECA- on the declarative query language of the
rule is monitoring. As such, there is underlying database, which raises the
often a close association between the possibility of applying optimization
event detector and the condition moni- techniques to rule conditions. In gen-
tor—the event detector initiates pro- eral, the existing optimizer can be ap-
cessing within the condition monitor, plied directly to the optimization of such
and information about the events that conditions, and significant gains in per-
have occurred must be passed from the formance are likely to be experienced
event detector to the condition monitor. where event parameters are used to re-
The more sophisticated the event detec- strict the information accessed by the
tor, the more complex will be the infor- condition. A similar theme is explored
mation to be passed to the condition by Baralis and Widom [1995], where it
monitor. For example, in the case of a is shown how exploitation of intermedi-
primitive event such as on insert to ate information held by the rule man-
Stock, the only information that needs ager can be used to speed up condition
be passed to the condition monitor evaluation, although this approach only
about the event is the inserted tuple. By provides significant gains where there
contrast, where the event is composite, is repeated triggering of individual
the relevant information about the rules. Furthermore, in systems with
event is also more complex. For exam- rich event algebras that are able to
ple, in a conjunctive event, information match specific values in events, an opti-
should be available to the condition of mizer may be able to move some of the
the rule on all of the events that caused selections from the condition into the
the conjunctive event to be signaled. event detector. It is also shown in Collet
Once rules that are associated with and Manchado [1995] how detailed
detected events have been retrieved analysis of rule conditions and actions
from the rule base and bound to the can be used to identify rules that are
parameters of these events, they must amenable to parallel execution.
be passed to the query evaluator to es- The design and implementation of ef-
tablish which rules have satisfied condi- fective situation monitors for active da-
tions. The query processor is likely to be tabase systems is of considerable impor-
an extension of that used with a passive tance, and various balances have to be
database, as rule conditions are param- struck between the provision of expres-
eterized with bindings from events, and sive facilities and efficiency of process-

ACM Computing Surveys, Vol. 31, No. 1, March 1999


Active Database Systems • 87

ing. For example, expressive event alge- provide access to the current event. For
bras enable more of the situation that is example, the predicate current_occur-
being monitored to be described within rence(O) can be used in rule conditions
the event part of the rule, which in turn or actions in EXACT to obtain the pa-
leads to less frequent invocation of sim- rameters of the event occurrence that
plified rule conditions. However, the re- has triggered the rule. Starburst stores
duced cost of condition evaluation must binding information in transition tables
be balanced against the considerable that record the net effect of tuple modi-
overheads associated with composite fications caused during query process-
event detection. A definitive position on ing. Transition tables can be queried by
the tradeoffs involved in situation mon- the condition or the action of a rule.
itoring awaits further theoretical and Unlike Starburst, POSTGRES has
empirical analyses of alternative ap- tuple-based processing, which consider-
proaches. ably simplifies the bindings, since only
the current tuple needs to be consid-
7.3 Action Execution ered. Correlation names new and old
are provided to allow accessing the
Rules with conditions that are satisfied value of the current tuple before and
are prepared for execution by the sched- after modification.
uler, which also maintains the conflict
set of triggered rules that have yet to be 7.4 Transaction Management
fired. The complexity of the scheduler
also varies considerably from system to It is often the case that sophisticated
system: for example, in POSTGRES facilities in the associated passive data-
[Stonebraker et al. 1990] the scheduler base system can be used to increase the
is quite straightforward, as all rules are functionality of the active mechanisms.
fired as soon as they are triggered, and For example, in active object-oriented
because there is no priority scheme that systems much has been made of the
requires rules to be fired in a specific ability to associate rules with user-de-
order. By contrast, in Starburst [Widom fined operations, and to share active
et al. 1991] the scheduler is more com- behavior within inheritance hierarchies.
plex: rules must be fired in an order Most implemented active database sys-
that is consistent with a priority graph, tems are associated with conventional
and it is possible for a rule to be re- flat transaction models, and thus rules
moved from the conflict set without be- are processed to completion within the
ing fired because the processing of rules same transaction as the events that led
is based upon the net effect of the to their triggering. However, where
changes to the underlying database. more sophisticated transaction manage-
When a rule is scheduled for execu- ment facilities are available, these can
tion, its action is passed to the query be exploited to increase the flexibility of
evaluator, which in turn is likely to conventional rule systems, and to allow
update the database and the history. addition of features that can be used to
The action of a rule is also likely to have support more advanced applications.
access to information on the event that Rich transaction models can be used
caused the rule to be triggered (i.e., to underpin a range of different behav-
BindE ), and may also be passed data ioral extensions to execution models
that have been retrieved by the condi- [Beeri and Milo 1991]. A nested transac-
tion of the rule (i.e., BindC ), for exam- tion is a transaction that contains
ple, the set of objects for which an integ- within it a number of component trans-
rity constraint has been violated. actions, or subtransactions [Moss 1985].
Binding can be supported in different The nested transaction creates the sub-
ways. In HiPAC and EXACT, explicitly transitions and waits until they termi-
specified parameters are available to nate. This model can be extended so

ACM Computing Surveys, Vol. 31, No. 1, March 1999


88 • N. W. Paton and O. Dı́az

that the nested transaction can run con- 7.5 Production Rule Algorithms
currently with the subtransactions
The architecture presented in Figure 5
[Harder and Rothermel 1993]. As well
makes explicit the role of event detec-
as speeding up the whole process as a tion for situation monitoring, whereas
result of increased concurrency, this some systems, such as Ariel [Hanson
model can be useful for active database 1992] and Amos [Skold and Risch 1995]
systems. For example, if the action of a support production (or condition-action)
rule is unable to carry out the task rules without explicit event specifica-
assigned to it, then there is a significant tions. In practice, however, primitive
chance that the whole transaction will update events must also be detected by
be aborted, potentially undoing a signif- database production systems, as the
icant amount of work. By contrast, if truth of a condition can be changed as a
the action of the rule is executed in a consequence of changes to the underly-
separate subtransaction (the triggered ing database. Figure 5 can thus be seen
transaction) which aborts, then the par- as a potential architecture for imple-
ent transaction (the triggering transac- menting a production rule system, al-
tion) is free to decide how to respond to though algorithms commonly used for
the failure: it could repeat the action a improving the efficiency of condition
set number of times, fire an alternative evaluation are quite different from
action, and so on. Such underlying func- those generally applied in the context of
tionality can be made available to the ECA-rules.
rule programmer as extensions to the Condition-action rules are processed
rule definition that describe how to re- in the context of the following recognize-
spond to failures. act cycle.
In addition, a number of issues can be match
identified that relate to the relationship while (conflict set not
between concurrency control and cou- empty) do
pling modes. If the triggering and trig- conflict resolution
act
gered transaction are executed concur- match
rently, it could happen, depending on end-while
the concurrency control method used,
that the triggered transaction commits In such a cycle, the match phase iden-
while the triggering transaction is still tifies rules with conditions that are true
executing (and thus, potentially abort- with respect to the state of the data-
ing). This possible behavior jeopardizes base, and adds them to the conflict
the concept of causality: an effect should set, which is essentially a queue of
not precede its cause [Hsu et al. 1988]. triggered rules waiting to be fired. The
conflict resolution step selects a
To fall into line with this concept, a
single rule from the conflict set for fur-
schedule must obey the following two
ther processing in the act phase, which
rules: the triggered transaction must be executes the statements in the action of
serialized after the triggering transac- the selected rule.
tion, and the triggered transaction can A naive evaluation of the match
commit only if the triggering transac- phase would evaluate the condition of
tion commits. The user may either every rule to find which rules should be
choose to obey the causality principle or considered for processing. Such an ap-
to allow the triggered transaction to be proach would be prohibitively expen-
executed freely. Using the terminology sive, and is unnecessary, as only a small
introduced in Section 4, these options part of the database over which each
correspond to the detached depen- condition acts is likely to change during
dent and detached independent cou- each cycle. What many methods seek to
pling modes, respectively. do is avoid recomputing the entire con-

ACM Computing Surveys, Vol. 31, No. 1, March 1999


Active Database Systems • 89

dition of a rule by storing information tom of the tree is the result node that
on the partially computed condition of a holds the conflict set.
rule between cycles. The Rete match phase operates by
In what follows, the example relations passing information down through the
from Figure 2 are used to illustrate two network from the root. For example, if a
of the principal approaches. A typical new Holder tuple is entered into the
production rule in Ariel notation [Han- database, it is tested to see if it has a
son 1992] relating to these data could country equal to UK—if so, it is stored
monitor every UK based owner of IBM in the a memory node alpha1. The tuple
stock: is then joined with the a memory node
alpha2, and if tuples result from the
if s.name 5 “IBM” and join, they are stored in the b memory
s.stock# 5 o.stock# and node beta1. Any such new tuples are
o.reg# 5 h.reg# and then joined to the a memory node al-
h.country 5 “UK” pha3 to yield additional data for the
from s in Stock, o in Owns, conflict set.
h in Holder Although Rete has been used in com-
do ^action& mercial production-rule systems, there
The query used to express the condi- are a number of problems, especially
tion involves a join of the Owns relation when large databases are used: the
with both Stock and Holder. space overhead is high, with both a and
The principal notion behind the Rete b memories storing the intermediate re-
[Forgy 1982] matching algorithm, which sults of computation, and maintenance
was originally proposed for implement- of such results, particularly on deletion
of data, imposes a significant overhead.
ing main-memory OPS-5 production
Work on the identification of alterna-
rule systems, is that by storing the par-
tives to Rete has explored two principal
tially computed condition of a rule be-
issues relating to intermediate informa-
tween cycles of rule execution, the effect
tion.
of changes to the database on the con-
flict set can be computed with minimal What to Store. A spectrum can be
additional effort. The partially com- seen to exist, with no storage of inter-
puted condition of a rule is often stored mediate results at one end, and storage
in a graph structure known as a dis- of all intermediate results at the other.
crimination network. The preceding ex- Rete is at the storage-intensive end of
ample query can be represented by the this spectrum, with both a and b mem-
Rete discrimination network in Figure ories being used. A variation of Rete
7. with a but no b memories is TREAT
The Rete network has a number of [Miranker 1987], which outperforms
different node types: a root node serves Rete in many cases [Wang and Hanson
as the entry point to the network; below 1992]. More recent research has shown
the root node are a number of nodes how rules can be analyzed to identify
that represent the base tables; and be- what level of intermediate storage is
low any node that represents a stored most suitable for them [Fabret et al.
table, there can be zero or more filter 1993].
nodes, each of which applies a single
condition to the relation. After a filter How to Store It. Algorithms such as
has been applied, the tuples that have TREAT can be built directly on top of
satisfied the condition in the filter are relational storage structures, but re-
stored in a memory tables. A node with searchers have identified structures
two parents performs a join on its par- that improve certain aspects of condi-
ent relations, the result of which is tion monitoring. For example, Hanson
stored in a b memory node. At the bot- [1992] exploits interval skip lists to re-

ACM Computing Surveys, Vol. 31, No. 1, March 1999


90 • N. W. Paton and O. Dı́az

Figure 7. Rete network for example rule.

duce the cost of searching and updating set of cooperating objects distributed
a memories, and Brant and Miranker throughout a network of loosely coupled
[1993] use a specialized index structure autonomous nodes. Event detection,
to improve join performance. event management, or rule manage-
ment are seen as services that cooperate
7.6 Active Rules in a Distributed to offer the functionality previously
Environment bundled in a monolithic active mecha-
Until now, this article has assumed that nism. Standards such as CORBA [Orfali
active behavior is being supported in a et al. 1996] provide the communication
single centralized database. However, middleware required for cooperation in
many modern applications have a dis- this distributed setting. Figure 8 gives
tributed nature, and a number of pro- an overview of how the architecture pre-
posals have been made for exploiting sented in Figure 11 has been adapted to
active behavior in distributed systems. the new setting. The pioneer work of C2
Here, the active mechanism is seen as a offeine [Koschel et al. 1997] illustrates

ACM Computing Surveys, Vol. 31, No. 1, March 1999


Active Database Systems • 91

Figure 8. Active rule system architecture: moving to a distributed setting.

this approach. This system enables ECA fers distinct alternatives: (1) a central
rule-based detection, processing, and re- rule manager maintaining a global rule
porting of events and complex situa- base, (2) a set of rule managers in dis-
tions to be done in CORBA-based sys- tinct sites each one with its local rule
tems with heterogeneous and base, and (3) a set of rule managers but
distributed information sources. Despite with a global rule set [von Bueltzings-
the limited experience to date, some in- loewen et al. 1998].
sights can be given about the implica- Being in a distributed context, archi-
tions of distribution of active rule sup- tectural alternatives must consider
port. communication overheads. For instance,
As far as architecture is concerned, CORBA includes an event service that
rule management is no longer central- supports asynchronous communication
ized but distributed. Although Figure 8 between objects. Communication is
suggests that each component is cen- achieved through event channels. An
trally located at a different site, this event channel is a queue onto which
does not need to be so. For instance, events are placed by suppliers and re-
event detection can be distributed moved by consumers. Two models are
among sites [Bacon et al. 1995; Schwid- provided for event communication,
erski 1996]. Each site contains a local based on who initiates the communica-
event detector and a global event detec- tion. The push model allows a supplier
tor. The former basically corresponds to of events to initiate the transfer of the
the detectors found in centralized sys- event data to consumers. The pull
tems, while the latter are responsible model permits a consumer of events to
for monitoring intersite composite request the event data from a supplier.2
events. A global event detector responsi- These options should be considered
ble for event e registers its interest in
e’s components in the corresponding de-
tectors. The detection of a global event 2
A key point, however, is that both the supplier
is then distributed among different and the consumer are aware of event processing;
sites. As soon as an event is detected, a that is, they have to initiate event processing
explicitly, thus violating the nonintrusive princi-
signal is sent to each of the detectors ple that characterizes the event-based paradigm.
that have registered an interest in it. Moreover, CORBA does not explicitly support
Likewise, rule management support of- composite events.

ACM Computing Surveys, Vol. 31, No. 1, March 1999


92 • N. W. Paton and O. Dı́az

when addressing communication among site has its own local clock, and events
the distinct components supporting the may occur simultaneously at different
active functionality. For instance, sites. As events contributing to a com-
should the signaling phase involving posite event originate from different
communication between event sources sites, an event’s timestamp should be
and the event detector follow a push globally meaningful. Therefore, local
model (also known as reactive) or a pull clocks must be synchronized through
model (also known as proactive)? Reac- special time servers that transmit time
tive models are useful for central event information to each site, and the delay
detectors where every event is relevant in the synchronization among the sites
for the system. Otherwise, an important should be below a parameter P obtained
communication overhead is caused since as the maximum time difference be-
every event must be communicated to tween two “simultaneous” ticks of any
the event detector. On the other hand, two local clocks. Summing up, two time-
proactive models incur a bigger process- stamps are required, namely, local
ing overhead [von Bueltzingsloewen et timestamps, needed for constructing in-
al. 1999]. Likewise, communication be- trasite composite events, and global
tween the event detector and the rule timestamps as a canonical form used in
manager (the triggering phase) can also the detection of intersite composite
follow a reactive or a proactive ap- events [Schwiderski 1996].
proach. The former implies explicit sub- Finally, the execution model also
scription of the rule manager to the set needs to be revised. As a case in point,
of events in which it is interested, the error handling dimension should
whereas the proactive approach leaves now be extended with communication
the rule manager to poll the event col- delays and disruptions to be faced in
lection periodically [von Bueltzingsloe- any messaging among the components
wen et al. 1999]. of the active mechanism. The solution
In addition to architectural consider- will vary depending on the components
ations, both the knowledge and execu- and the impact of the error. For in-
tion models should also be revised when stance, communication delays during
moved to a distributed (and potentially signaling between the event detector
heterogeneous) setting. As for the and an event source can cause global
knowledge model, heterogeneity of the event detectors to receive events in a
event sources can lead to additional different order from their actual occur-
classifications besides those found in rence. Contingency actions can opt for
centralized systems (e.g., workflow asynchronous evaluation or synchronous
events). Also, the diversity of the data evaluation [Schwiderski 1996]. The
sources and the lack of a single state former ignores the fact that there may
requires further precision in setting the be delayed events, and begins evalua-
context in which conditions and actions tion as soon as suitable event occur-
are performed. A complex problem is rences arrive at a composite event de-
that of timestamps. In a centralized sys- tector. Hence, events are not composed
tem there is a single clock that allows a in a way that takes account of the order
total ordering of event instances based of their occurrence, but, on the other
on their occurrence time. That is, two hand, event detection is not blocked by
distinct primitive events e 1 and e 2 can delayed events and is therefore faster.
always be ordered as they cannot occur As an example, consider the event e 1 or
simultaneously: either e 1 happens be- e 2 . If e 2 ’s site fails, the disjunction can
fore e 2 or vice versa. The time of a still be detected whenever e 1 is de-
composite event occurrence is then de- tected. By contrast, synchronous evalu-
rived from the occurrence times of its ation waits for delayed events, and eval-
components. By contrast, distributed uation proceeds only if all relevant
systems do not have global time: each events have arrived at the site of the

ACM Computing Surveys, Vol. 31, No. 1, March 1999


Active Database Systems • 93

global event detector. Although syn- active mechanisms, and which using
chronous evaluation respects the occur- other techniques, and (2) what perfor-
rence order of events, the evaluation mance penalty is likely to result from
may be blocked long-term if there is the use of rules. This is exacerbated
transmission disruption or site failure. by the lack of appropriate design
In the previous disjunctive example, the methodologies.
sites of both e 1 and e 2 are checked for —The functionality of a large rule base
relevant events before a disjunctive may be difficult to understand, with
event occurrence is detected. In most rules interacting in complex ways and
cases, checking reveals that no relevant no single description of how control
events should have been detected. Occa- flows through an application.
sionally, a disruption can occur that de- —The tools associated with an active
lays the arrival of a relevant event. The rule system may be minimal, with
global detector does this checking so little support for browsing, monitor-
that the consumption policy can be ing, or debugging of active rules.
properly supported. As Schwiderski
points out, which strategy is most ap- These points reflect a need for design
propriate depends on the application. methodologies, rule analysis tech-
Likewise, failure of data source access niques, and tools for debugging and ex-
(e.g., due to a node breakdown) during planation. In what follows, recent ad-
condition evaluation or action execution vances in each of these areas are
should be addressed. The options pro- outlined.
posed range from an instead action to
the execution of no action [Koschel et al. 8.1 Rule Design
1997].
Although few details are yet avail- There are well-established techniques
able, distributed active rule manage- for database design that emphasize the
ment is likely to be one of the future description of the structural aspects of
services offered by CORBA-compliant information in a domain (e.g., E/R mod-
suppliers. Its need can be corroborated eling, normalization), and which in turn
by the proposals for event mechanisms are used alongside mechanisms for de-
which, independently of the active scribing processes (e.g., dataflow dia-
DBMS community, have already been grams) to capture the semantics of com-
proposed for supporting debugging plete applications. Although active
[Bates 1995], communication, and inte- behavior is often closely linked to the
gration in distributed applications structures stored in a database, and
[Amouroux 1995; Barghouti and Krish- rule actions carry out tasks that can be
namurthy 1995]. viewed as processes, it is not yet clear
what techniques are most suitable for,
or most easily adapted to address, the
8. DEVELOPING ACTIVE APPLICATIONS
functionalities supported by active
Comprehensive support for active mech- rules. In particular, given the require-
anisms within a database system is no ments of an application, design tech-
guarantee that they will be used. In- niques should provide guidance on the
deed, experience in the application of aspects that should be supported using
active databases often indicates that al- active mechanisms, and those that are
though such facilities are suitable for better addressed using other facilities.
performing a range of different tasks, Where proposals have been made for
they are not straightforward to use. Dif- methods with explicit support for active
ficulties include the following. behavior, this has often been as an ex-
tension to an existing structural data
—It is not obvious (1) which parts of an model. For example, (ER) 2 [Navathe et
application should be supported using al. 1995] is an extension of the E/R

ACM Computing Surveys, Vol. 31, No. 1, March 1999


94 • N. W. Paton and O. Dı́az

model to support the description of


events and rules that can be mapped to
active rule facilities similar to those
found in commercial relational data-
bases. IFO2 adapts the modeling con-
structs of the IFO semantic data model
[Abiteboul and Hull 1987] for use in
describing composite events, and also
includes a mapping to an active rule
language, although in this case the des-
ignated language must be more power-
ful than in the case of (ER) 2 . More
comprehensive facilities still, including
temporal events, are provided by
Bichler and Schrefl [1994] in an ex-
tended object-oriented modeling lan-
guage. These approaches, however, all
assume that active rules should surface
explicitly in the design method, which
Figure 9. Graph depicting possible rule trigger-
tends to prejudge the question of which ing dependencies.
parts of an application should be sup-
ported using active techniques and
which using other alternatives. 1995; Fernandes et al. 1997], but al-
This has been the focus of the IDEA though such proposals help to clarify
methodology [Ceri and Fraternali 1997] the informal definitions of specific sys-
which gives some initial insights on this tems, they have not yet been used as a
topic, and provides high-level descrip- basis for reasoning about rule bases.
tion languages which in the later stages There are a number of different char-
of development are mapped into low- acteristics of rule behavior for which a
level triggers (such as those found in a rule analyzer can search [Aiken et al.
commercial DBMS). 1992].
—Termination. Is rule processing
8.2 Rule Analysis
guaranteed to terminate? Rule pro-
The semantics of most active database cessing may fail to terminate when-
systems in the literature are described ever a cycle exists in a graph in which
informally; for representative examples nodes represent rules and edges rep-
see Section 6, and papers such as Stone- resent Can-Trigger relationships—the
braker et al. [1990] and Widom and triggering graph. For example, in Fig-
Finkelstein [1990]. There are a number ure 9, any firing of rules R2 and R4 is
of disadvantages to this approach: spe- guaranteed to terminate, but any fir-
cific descriptions may be incomplete or ing of rules R1 or R3 may initiate a
ambiguous, it is often difficult to com- series of rule firings that fails to ter-
pare the functionality of different sys- minate.
tems, and there is no basis upon which Static analysis of a rule base can indi-
to build tools that support the formal cate whether a set of rules may fail to
analysis of rule bases. Recently, formal terminate. For example, a straightfor-
specifications have been developed for ward approach to the analysis of the
active database systems using denota- Can-Trigger relationship would insert
tional semantics [Widom 1992; Coupaye an edge from rule R i to rule R j if the
and Collet 1995], Object-Z [Campin et action of R i performs an update to a
al. 1997], and combined logic/opera- relation that is being monitored by
tional techniques [Fraternali and Tanca the event of R j . This approach is

ACM Computing Surveys, Vol. 31, No. 1, March 1999


Active Database Systems • 95

conservative, in the sense that poten-


tial nontermination will be detected
even when in practice the rules will
always terminate. For example, con-
sider the following rule definition that
relates to the unary relation Rel with
the integer attribute num.

create rule R1 as
on insert to Rel
if num . 10
do insert into Rel values
(5)
Using the approach described previ-
ously, R1 in itself would be considered
to be a potential source of nontermi-
nation, although in practice R1 is
never directly recursive because the
tuple inserted by its action always Figure 10. Graph depicting confluent rule behav-
leads to the condition of the rule be- ior.
ing false. Less conservative ap-
proaches to rule termination analysis
that examine the conditions and the
actions of rules in more detail, but on insert to Owns or update
to reg# of Owns or
which are as a result more system
update to reg# of Holder
specific, are presented in Baralis and if ^amount of stock held by
Widom [1994] and Weik and Heurer Holder h is more than Num-
[1995]. Stocks&
do ^reduce range of stock
—Confluence. Is the result of rule held by Holder h&
processing independent of the order
in which simultaneously triggered These rules clearly implement incon-
rules are selected for processing? If sistent policies regarding stock hold-
the policy Holder relation from Sec- ing; if both rules have the same prior-
tion 2 had an attribute NumStocks, ity and are present in the rule base at
the role of this attribute could be in- the same time, then updates to the
terpreted differently by different database will nondeterministically af-
rules. For example, the following rule fect what stock is held.
would help to maintain NumStocks as Confluence can be understood by con-
the number of items of stock held. sidering that the firing of a rule in
one database state may lead to the
on insert to Owns or creation of a new database state. If
update to reg# of Owns or more than one rule is triggered at the
update to reg# of Holder same time, then more than one poten-
if ^change affects amount of tial successor state exists, as illus-
stock held by Holder h& trated in Figure 10 where the states
do ^update NumStocks at-
tribute of h&
S2 and S3 are the successors of S1
that result from the firing of rules R i
However, an alternative interpreta- and R j , respectively. A rule base is
tion would treat NumStocks as the confluent if for any two rules R i and
maximum number of stocks that a R j triggered in any initial state S1, a
Holder can own at any one time, giv- single final state S4 is guaranteed to
ing rise to the following rule. be reached regardless of the order in

ACM Computing Surveys, Vol. 31, No. 1, March 1999


96 • N. W. Paton and O. Dı́az

which any subsequent simultaneously plied with active systems, and because
triggered rules are selected for firing it is not always obvious what action
(denoted as * in Figure 10). Note that, should be taken when a potential source
for example, the actions of rules R i of nontermination or nonconfluence is
and R j may have triggered additional detected. There is a range of possible
rules as a side-effect of the transition changes that can be made: rule priori-
from S1 to states S2 and S3, and that ties can be used to tailor the order in
the behaviors of these subsequently which rules fire, rule conditions or ac-
triggered rules have to be taken into tions can be modified to change their
account when considering confluence effect, or rules may be seen to be imple-
of the entire rule base. Work on con- menting conflicting policies and
fluence analysis has developed algo- dropped. The development of effective
rithms for analyzing complete rule rule analysis systems awaits further
bases [Aiken et al. 1992], for consider- work on communicating the results of
ing the effect of an update on the analysis to users, as well as experience
truth of a condition [Baralis and Wi- based upon the use of implemented rule
dom 1994; Levy and Sagiv 1993], and analyzers.
for characterizing the contexts in
which nonconfluent behavior may be 8.3 Rule Debugging
exhibited [van der Voort and Siebes
1994]. Users may be reluctant to apply active
facilities because of anticipated prob-
—Observable determinism. Is the lems with maintenance, unforeseeable
effect of rule processing as observed behavior, and lack of control [Simon and
by a user of the system independent Kotz-Dittrich 1995], which motivates
of the order in which triggered rules the development of debugging environ-
are selected for processing? This no- ments that help in defining safe rule
tion seeks to extend deterministic sets, that is, rules that comply with the
rule system behavior beyond the termination, confluence, and observable
boundaries of the database itself. For determinism properties previously de-
example, the following two rules im- scribed.
plement a response which is confluent Unfortunately, these properties are
but observably nondeterministic. not always easy to ascertain for a fully
on ^event E1& fledged rule language at compile time,
if ^condition C1& and hence research on rule analysis has
do ^send message to user& focused on formal declarative lan-
on ^event E1& guages. However, not all authors agree
if ^condition C1& that active rule systems should neces-
do ^abort& sarily be associated with such lan-
guages, and many implemented rule
In this example, if the first rule is
systems are integrated with imperative
scheduled for firing before the second,
database programming languages
then the user receives a message and
[Buchmann 1994]. Furthermore, the
the transaction over the database is
aborted. By contrast, if the second fact that a rule base exhibits terminat-
rule is scheduled before the first, then ing and confluent behavior does not in
the transaction is aborted, but no itself imply that it is correct. Thus, as
message is sent to the user. rule languages become more compli-
cated, thereby increasing the range of
Initial research into the static analy- applications for which they are suitable,
sis of active rule bases has not, to date, the need for rule debugging environ-
significantly eased the development of ments becomes increasingly pressing.
active applications. This is because such Unfortunately, traditional debugger
rule analyzers are not generally sup- models are not adequate for debugging

ACM Computing Surveys, Vol. 31, No. 1, March 1999


Active Database Systems • 97

Figure 11. An intertwined event-rule cycle.

rules. Conventional debuggers provide firing, as represented by the conflict set,


exhaustive information on the state of depend on the events raised (internal or
the execution process (e.g., program external to the DBMS). Hence, it is
variables, subroutines, and the like), more appropriate to reveal the context
thereby allowing the user to monitor the in which rules have been triggered (e.g.,
evolution of this state information. By the conflict set and the event base) than
contrast, what makes rule debugging a to present a sequential trace of trig-
challenging task are the insidious ways gered rules. DEAR, a debugger for EX-
in which rules can interact. Interaction, ACT [Diaz et al. 1994], attempts to ad-
rather than state, becomes the main dress this issue by showing the
source of incorrect or unexpected behav- intertwined cycle of rules and events.
ior, and this context-dependent control Hence, the user can ascertain not only
exhibited by active rules imposes new which rules have been triggered, but
demands on the debugger. also whether the event triggering the
Unlike traditional programming lan- rule was raised from a top-level transac-
guages, where sequential control is tion instruction or a rule execution.
specified both explicitly and statically Furthermore, when an event is raised,
by the programmer, active rules are such a cycle permits identification of the
fired dynamically by the system based context in which the event took place in
on the previous flow of events. There is terms of recently triggered rules.
thus no way to know in advance which Figure 11 shows such an event-rule
rules will be fired. Rules eligible for cycle for an immediate coupling mode.

ACM Computing Surveys, Vol. 31, No. 1, March 1999


98 • N. W. Paton and O. Dı́az

The representation is a tree where the size tends to increase in a uniform way,
root is artificially created (the corre- it suggests that the cycle will not termi-
sponding node is labeled with root) and nate. Erroneous rule condition declara-
its direct descendants are the first tions may be suspected if the number of
events to be raised. Nodes can represent times a rule is executed is very low
either events or rules, where event compared to the number of times the
nodes alternate with rule nodes. An arc rule is triggered. Thus, features of sta-
from an event node to a rule node tistical data can point to potentially ab-
means that the event has triggered the normal behavior.
rule. An arc from a rule node to an The preceding approaches have fo-
event node means that the event was cused mainly on displaying the inter-
produced as a result of executing the leaving of events and rules, but are
action of the rule. As execution pro- restricted to primitive events. The mon-
ceeds, the event/rule tree is constructed itoring of composite event occurrences is
depth-first. In Figure 11, event (put_ a more complicated task due to the
projects,before,2#manager) happened be- large number of occurrences that may
fore (modify_method,before,2#manager), need to be shown and the intricate ways
and the leftmost occurrence of rule 12#in- in which events are combined to obtain
tegrity_rule before the leftmost occur- composite event occurrences. A first ap-
rence of rule 14#integrity_rule. More- proach to this issue has been presented
over, Figure 11 also makes explicit the as part of the Sentinel system [Chakra-
conflict set of simultaneously triggered varthy et al. 1995]. Sentinel provides a
rules, once the conflicts among those post-execution debugging tool where in-
rules have been resolved by the rule formation from the execution is stored
manager. An indication of the rules par- in log files that are consulted by the
ticipating in this conflict set is useful debugging tool to simulate runtime ac-
for focusing on a restricted number of tivities. An event tree is created where
rules where complex interactions can primitive events are leaf nodes and
occur. composite events are seen as parents of
Rather than building trees following their component events. A color code is
the execution, an alternative investi- used to represent event status (detected
gated in the visual tool for rule analysis or not detected). This tree grows from
VITAL [Benazet et al. 1995] is to show primitive events to the root. In addition,
the trace in the triggering graph created a transaction tree describes the trigger-
during analysis (see Figure 9). A color ing rule context: the root node repre-
code is used for each event state (i.e., sents the top-level transaction, and
raised or not raised) and each rule state child nodes represent rules fired in the
(i.e., inactive, triggered, or executed). context of their parent node (either the
As execution proceeds the displayed col- user transaction or a rule, as rules are
ors change, and a textual trace of the executed as subtransactions). A color
execution is displayed in a separated code is used to represent the different
window. VITAL also proposes the use of states of subtransactions: running, sus-
a statistics manager that calculates and pended, or committed. Whenever a rule
records statistics on the behavior of the is fired, a line is drawn connecting the
rule processor (e.g., the number of transaction node of the current rule and
tuples inserted, deleted, or modified the triggering event. An example is
during a rule execution cycle, the num- given in Figure 12. The detection of
ber of times a rule is triggered, etc). events e1 and e2 leads to the happening
These data can be used, for instance, to of the conjunction event e5, which in
identify potentially infinite cycles, or to turn causes the triggering of rule R1
help find erroneous rule declarations. (i.e., trans 111). This rule is fired in the
The former can be ascertained by moni- context of the running transaction trans
toring the size of relevant tables: if the 11, which is a child of transaction trans

ACM Computing Surveys, Vol. 31, No. 1, March 1999


Active Database Systems • 99

framework, indicating how imple-


mented systems support the principal
features described in the framework,
and by outlining ongoing activity on
tools that support the design and imple-
mentation of applications that exploit
active technologies. In so doing, the aim
has been to identify the principal contri-
butions made by researchers to date, to
indicate how important ideas have
made their way into implemented sys-
tems, to allow detailed comparison of
specific proposals, and to suggest areas
that stand to benefit from future re-
search results.
Future research is required on appli-
cation and efficient implementation of
Figure 12. Tracing composite events in Sentinel. event algebras, optimization of active
rules, implementation and use of rule
analyzers, tools that support design and
1. In the first version of this system, all maintenance of rule bases, architec-
rules and events produced are shown, tures for realtime active applications,
which could lead to cluttered visualiza- distributed active functionality, and in-
tions [Chakravarthy et al. 1995]. tegration of active behavior with deduc-
Despite the advances in rule debug- tive and temporal facilities.
ging, more remains to be done (e.g.,
customizable visualization of rule exe- ACKNOWLEDGMENTS
cution, automatic generation of test We are grateful to our colleagues for useful dis-
data), and different active rule system cussions on active database systems, including
functionalities are likely to be most ef- Alex Buchmann, Andrew Dinn, Alvaro Fernandes,
fectively presented to users using differ- Ray Fernandez, Peter Gray, Jon Iturrioz, Arturo
ent visualizations. Jaime, and Howard Williams.

9. CONCLUSIONS REFERENCES
Research into active databases has pro- ABITEBOUL, S. AND HULL, R. 1987. IFO: A for-
ceeded along similar lines to early re- mal semantic database model. ACM Trans.
Database Syst. 12, 4 (Dec.), 525–565.
search into object-oriented databases, in
AGRAWAL, R., COCHRANE, R., AND LINDSAY, B.
that there has been considerable exper- 1991. On maintaining priorities in a produc-
imentation, but relatively little work on tion rule language. In Proceedings of the Sev-
standardization or theory. This has re- enteenth VLDB, G. Lohman, A. Sernadas, and
sulted in a wide range of constructs, R. Camps, Eds., Morgan-Kaufmann, San Ma-
execution strategies, and software ar- teo, CA, 479 – 487.
chitectures being proposed that have AIKEN, A., WIDOM, J., AND HELLERSTEIN, J. 1992.
Behaviour of database production rules: Ter-
utility in different problem domains mination, confluence, and observable deter-
[Dittrich et al. 1995]. This survey has minism. In SIGMOD Rec. 21, 59 – 68.
reviewed research and development AMOUROUX, R. 1995. Reactive services for sup-
work in active databases by: describing porting tool integration in a development en-
tasks that can benefit from active be- vironment. In Proceedings on Technology of
Object-Oriented Languages and Systems
havior, presenting a framework that (TOOLS), 61–70.
characterizes important aspects of ac- BACON, J., BATES, J., HAYTON, R., AND MOODY,
tive functionality, describing a range of K. 1995. Using events to build distributed
representative systems within the applications. In Proceedings of the Interna-

ACM Computing Surveys, Vol. 31, No. 1, March 1999


100 • N. W. Paton and O. Dı́az

tional Workshop on Services in Distributed dia, Proceedings of the Basque International


and Networked Environments (SDNE) (Whis- Workshop on IT, C. Chrisment, Ed., Cepadues
tler, BC), 148 –155. Editions, 121–133.
BARALIS, E. AND WIDOM, J. 1994. An algebraic BUCHMANN, A., ZIMMERMANN, J., BLAKELY, J., AND
approach to rule analysis in expert database WELLS, D. 1995. Building an integrated ac-
systems. In Proceedings of the Twentieth tive OODBMS: Requirements, architecture,
VLDB, J. Bocca, M. Jarke, and C. Zaniolo, and design decisions. In Proceedings of IEEE
Eds., Morgan-Kaufmann, San Mateo, CA, Data Engineering, 117–128.
475– 486. CAMPIN, J., PATON, N., AND WILLIAMS, M. 1997.
BARALIS, E. AND WIDOM, J. 1995. Using delta Specifying active database systems in an ob-
relations to optimize condition evaluation in ject-oriented framework. Softw. Eng. Knowl.
active databases. In Proceedings of the Second Eng. 7(1), 101–123.
International Workshop on Rules In Database CERI, S. AND FRATERNALI, P. 1997. Designing
Systems (RIDS), T. Sellis, Ed., Springer-Ver- Applications with Objects and Rules: The
lag, 292–308. IDEA Methodology. International Series on
BARGHOUTI, N. AND KRISHNAMURTHY, B. 1995. Database Systems and Applications, Addison-
Using event contexts and matching con- Wesley Longman, Reading, MA.
straints to monitor software processes. In Pro- CERI, S. AND WIDOM, J. 1993. Managing seman-
ceedings of the ICSE, 83–92. tic heterogeneity with production rules and
BATES, P. 1995. Debugging heterogeneous dis- persistent queries. In Proceedings of the Nine-
tributed systems using event-based models of teenth International Conference on Very Large
behaviour. ACM Trans. Comput. Syst. 13, 1, Data Bases, R. Agrawal, S. Baker, and D.
1–31. Bell, Eds., Morgan-Kaufmann, San Mateo,
BAYER, P. AND JONKER, W. 1994. A framework CA, 108 –119.
for supporting triggers in deductive data- CERI, S. AND WIDOM, J. 1991. Deriving produc-
bases. In Proceedings of the First Interna- tion rules for incremental view maintenance.
tional Workshop on Rules in Database Sys- In Proceedings of the Seventeenth Interna-
tems, N. Paton and M. Williams, Eds., tional Conference on Very Large Data Bases,
Springer-Verlag, 316 –330. R. C. G. M. Lohman and A. Sernadas, Eds.,
BEERI, C. AND MILO, T. 1991. A model for active Morgan-Kaufmann, San Mateo, CA, 577–589.
object oriented database. In Proceedings of the CERI, S., FRATERNALI, P., PARABOSCHI, S., AND
Seventeenth International Conference on Very TANCA, L. 1996. Active rule management
Large Data Bases (Barcelona), R. C. G. M. in Chimera. In Active Database Systems: Trig-
Lohman and A. Sernadas, Eds., Morgan-Kauf- gers and Rules for Active Database Processing,
mann, San Mateo, CA, 337–350. J. Widom and S. Ceri, Eds., Morgan-Kauf-
BENAZET, E., GUEHL, H., AND BOUZEGHOUB, M. mann, San Mateo, CA, 151–175.
1995. VISUAL: A visual tool for analysis of CERI, S., GOTTLOB, G., AND TANCA, L. 1990.
rule behaviour in active databases. In Pro- Logic Programming and Databases, Springer-
ceedings of the Second International Work- Verlag, Berlin.
shop on Rules in Database Systems, T. Sellis, CHAKRAVARTHY, S. 1989. Rule management and
Ed., Springer-Verlag, 182–196. evaluation: An active DBMS perspective. SIG-
BICHLER, P. AND SCHREFL, M. 1994. Active ob- MOD Rec. 18, 3, 20 –28.
ject-oriented database using active object/be- CHAKRAVARTHY, S., ANWAR, E., MAUGIS, L., AND
haviour diagrams. In Proceedings of the MISHRA, D. 1994a. Design of Sentinel: An
Fourth International Workshop on Research object-oriented DBMS with event-based rules.
Issues in Data Engineering (RIDE-ADS’94), Inf. Softw. Technol. 36, 9, 555–568.
163–171. CHAKRAVARTHY, S., KRISHNAPRASAD, V., ANWAR, E.,
BLUE, A., BROWN, B., AND GRAY, W. 1988. An AND KIM, S.-K. 1994b. Composite events for
implementation of alerters for health district active databases: Semantics, contexts and de-
management. In Proceedings of the Sixth Brit- tection. In Proceedings of the Twentieth Inter-
ish National Conference on Databases (BN- national Conference on Very Large Data
COD), W. Gray, Ed., 125–140. Bases, J. Bocca, M. Jarke, and C. Zaniolo,
BRANDING, H., BUCHMANN, A., KUDRASS, T., AND Eds., Morgan-Kaufmann, San Mateo, CA,
ZIMMERMANN, J. 1994. Rules in an open 606 – 617.
system: The REACH rule system. In Rules in CHAKRAVARTHY, S., TAMIZUDDIN, Z., AND ZHOU,
Database Systems, N. Paton and M. Williams, J. 1995c. A visualization and explanation
Eds., Springer-Verlag, 111–126. tool for debugging ECA rules in active data-
BRANT, D. AND MIRANKER, D. 1993. Index sup- bases. In Proceedings of the Second Interna-
port for rule activation. SIGMOD Rec. 42– 48. tional Workshop on Rules in Database Sys-
BUCHMANN, A. 1994. Current trends in active tems, T. Sellis, Ed., Springer-Verlag, 196 –
databases: Are we solving the right problems. 209.
In Information Systems Design and Multime- CHANDRA, R. AND SEGEV, A. 1994. Active data-

ACM Computing Surveys, Vol. 31, No. 1, March 1999


Active Database Systems • 101

bases for financial applications. In Proceed- DINN, A., PATON, N., WILLIAMS, M., AND FER-
ings of the Fourth International Workshop on NANDES, A. 1996. An active rule language
Research in Data Engineering (RIDE-ADS), J. for ROCK & ROLL. In Proceedings of the
Widom and S. Chakravarthy, Eds., IEEE, 46 – Fourteenth British National Conference on
52. Databases, Springer-Verlag, 36 –55.
COLLET, C. AND MANCHADO, J. 1995. Optimiza- DITTRICH, A. K. 1993. Adding active functional-
tion of active rules with parallelism. In Pro- ity to an object-oriented database—a layered
ceedings of Active and Real Time Database approach. In Proceedings of Datenbank-
Systems (ARTDB), M. Berndtsson and J. systeme in Buro (Braunschweig, Germany).
Hansson, Eds., Springer-Verlag, 82–103. DITTRICH, K., GATZIU, S., AND GEPPERT, A.
COLLET, C., COUPAYE, T., AND SVENSEN, T. 1994. 1995. The active database management sys-
NAOS: Efficient and modular reactive capa- tem manifesto: A rulebase of ADBMS fea-
bilities in an object-oriented database system. tures. In Rules In Database Systems: Proceed-
In Proceedings of the Twentieth VLDB Confer- ings of the Second International Workshop, T.
ence, J. Bocca, M. Jarke, and C. Zaniolo, Eds., Sellis, Ed., Springer-Verlag, 3–17.
Morgan-Kaufmann, San Mateo, CA, 132–143. ETZION, O. 1993. PARDES—a data-driven ori-
COUPAYE, T. AND COLLET, C. 1995. Denotational ented active database model. SIGMOD Rec.
semantics for an active rule execution model. 22, 1, 7–14.
In Proceedings of the Second International ETZION, O., GAL, A., AND SEGEV, A. 1994. Data
Workshop on Rules in Database Systems, T. driven and temporal rules in PARDES. In
Sellis, Ed., Springer-Verlag, 36 –50. Proceedings of the First International Work-
DAYAL, U. 1989. Active database management shop on Rules in Database Systems, N. Paton
systems. SIGMOD Rec. 18, 3, 150 –169. and M. Williams, Eds., Springer-Verlag, 92–
108.
DAYAL, U., BUCHMANN, A., AND MCCARTHY, D.
1988. Rules are objects too: A knowledge FABRET, F., REGNIER, M., AND SIMON, E. 1993.
model for an active object oriented database An adaptive algorithm for incremental evalu-
system. In Proceedings of the Second Interna- ation of production rules in databases. In
Proceedings of the Nineteenth International
tional Workshop on OODBS, LNCS 334, K.
Conference on Very Large Data Bases, R.
Dittrich, Ed., Springer-Verlag, 129 –143.
Agrawal, S. Baker, and D. Bell, Eds., Morgan-
DAYAL, U., HSU, M., AND LANDIN, R. 1990. Or- Kaufmann, San Mateo, CA, 455– 466.
ganising long-running activities with triggers
FERNANDES, A., WILLIAMS, M., AND PATON, N.
and transactions. In Proceedings of the SIG-
1997. A logic-based integration of active and
MOD Conference, ACM, New York, 204 –214.
deductive databases. New Gen. Comput. 15, 2,
DEUX, O. ET AL. 1990. The story of O 2 . IEEE 205–244.
Trans. Knowl. Data Eng. 2, 1 (March), 91– FERNANDEZ, R. AND DIAZ, O. 1995. Reactive be-
108. haviour support: Themes and variations. In
DIAZ, O. 1992. Deriving rules for constraint Proceedings of the Second International Work-
maintenance in an object-oriented database. shop on Rules in Database Systems, T. Sellis,
In Proceedings of the International Conference Ed., Springer-Verlag, 69 – 85.
on Databases and Expert Systems DEXA, FORGY, C. 1982. Rete: A fast algorithm for the
I. R. A. M. Tjoa, Ed., Springer-Verlag, 332– many pattern/many object pattern match
337. problem. Artif. Intell. 19, 17–37.
DIAZ, O. AND JAIME, A. 1997. EXACT: an EX- FRATERNALI, P. AND TANCA, L. 1995. A struc-
tensible approach to ACTive object-oriented tured approach to the definition of the seman-
databases. VLDB J. 6, 4, 282–295. tics of active databases. ACM Trans. Data-
DIAZ, O., JAIME, A., AND PATON, N. 1994a. base Syst. 20, 4, 414 – 471.
DEAR: A DEbugger for Active Rules in an GATZIU, S. AND DITTRICH, K. 1994. Events in an
object-oriented context. In Proceedings of the active object-oriented database. In Proceed-
First International Workshop on Rules in Da- ings of the First International Workshop on
tabase Systems, N. Paton and M. Williams, Rules in Database Systems, N. Paton and M.
Eds., Springer-Verlag, 180 –193. Williams, Eds., Springer-Verlag, 23–39.
DIAZ, O., JAIME, A., PATON, N., AND AL QAIMARI, G. GATZIU, S., GEPPERT, A., AND DITTRICH, K. 1991.
1994b. Supporting dynamic displays using Integrating active concepts into an object-ori-
active rules. SIGMOD Rec. 23, 1, 21–26. ented database system. In Proceedings of the
DIAZ, O., PATON, N., AND GRAY, P. 1991. Rule Third Workshop on Database Programming
management in object-oriented databases: A Languages, P. Kanellakis and J. Schmidt,
uniform approach. In Proceedings of the Sev- Eds., Morgan-Kaufmann, San Mateo, CA.
enteenth International Conference on Very GEHANI, N. AND JAGADISH, H. 1991. ODE as an
Large Data Bases (Barcelona), G. Lohman, A. Active Database: Constraints and Triggers. In
Sernadas, and R. Camps, Eds., Morgan-Kauf- Proceedings of the Seventeenth International
mann, San Mateo, CA, 317–326. Conference on Very Large Data Bases (Barce-

ACM Computing Surveys, Vol. 31, No. 1, March 1999


102 • N. W. Paton and O. Dı́az

lona), R. C. G. M. Lohman and A. Sernadas, teenth VLDB, R. Agrawal, S. Baker, and D.


Eds., Morgan-Kaufmann, San Mateo, CA, Bell, Eds., Morgan-Kaufmann, San Mateo,
327–336. CA, 171–181.
GEHANI, N., JAGADISH, H., AND SHMUELI, O. 1992. MIRANKER, D. 1987. TREAT: A better match al-
Event specification in an active object-ori- gorithm for AI production systems. In Pro-
ented database. SIGMOD Rec., 81–90. ceedings of AAAI, 42– 47.
GEPPERT, A. AND DITTRICH, K. 1994. Rule-based MOSS, E. ED. 1985. Nested Transactions: An
implementation of transaction model specifi- Approach to Reliable Distributed Computing.
cations. In Proceedings of the First Interna- MIT Press, Cambridge, MA.
tional Workshop on Rules in Database Sys- NAQVI, W. AND IBRAHAM, M. 1994. Rule and
tems, N. Paton and M. Williams, Eds., knowledge management in an active database
Springer-Verlag, 127–142. system. In Proceedings of the First Interna-
GEPPERT, A., BERNDTSSON, M., LIEUWEN, D., AND tional Workshop on Rules in Database Sys-
RONCANCIO, C. 1998. Performance evalua- tems, N. Paton and M. Williams, Eds., Spring-
tion of object-oriented active database man- er-Verlag, 58 – 69.
agement systems using the beast benchmark. NAVATHE, S., TANAKA, A., MADHAVAN, R., AND GAN,
Tapos 4, 4. Y. H. 1995. A methodology for application
HANSON, E. 1992. Rule condition testing and design using active database technology.
action execution in Ariel. In Proceedings of Tech. Report RL-TR-95-41, Rome Laboratory.
SIGMOD, ACM, New York, 49 –58. ORFALI, R., HARKEY, D., AND EDWARDS, J. 1996.
HANSON, E. N. AND WIDOM, J. 1993. An over- The Essential Distributed Objects Survival
view of production rules in database systems. Guide. Wiley, New York.
Knowl. Eng. Rev. 8, 2, 121–143. PATON, N., ED. 1999. Active Rules in Database
HARDER, T. AND ROTHERMEL, K. 1993. Concur- Systems. Springer-Verlag.
rency control issues in nested transactions. PATON, N., DIAZ, O., AND BARJA, M. 1993.
VLDB J. 2, 1, 39 –74. Combining active rules and metaclasses for
HARRISON, J. AND DIETRICH, S. 1994. Integrat- enhanced extensibility in object-oriented sys-
ing active and deductive rules. In Proceedings tems. Data Knowl. Eng. 10, 45– 63.
of the First International Workshop on Rules PATON, N., DIAZ, O., WILLIAMS, M., CAMPIN, J.,
In Database Systems, N. Paton and M. Wil- DINN, A., AND JAIME, A. 1994. Dimensions
liams, Eds., Springer-Verlag, 288 –305. of active behaviour. In Proceedings of the First
HSU, M., LADIN, R., AND MCCARTHY, D. 1988. International Workshop on Rules in Database
An execution model for active data base man- Systems, N. Paton and M. Williams, Eds.,
agement systems. In Proceedings of the Inter- Springer-Verlag, 40 –57.
national Conference on Data and Knowledge PATON, N., DOAN, D., DIAZ, O., AND JAIME,
Bases, 171–179. A. 1996. Exploitation of object-oriented
KIERNAN, G., DE MAINDREVILLE, C., AND SIMON, E. and active constructs in database interface
1990. Making deductive databases a practi- development. In Proceedings of the Third In-
cal technology: A step forward. In Proceedings ternational Workshop on Interfaces to Data-
of the ACM SIGMOD Conference, H. Garcia- base Systems, J. Kennedy and P. Barclay,
Molina and H. Jagadish, Eds., 237–246. Eds., Springer-Verlag.
KIM, W., LEE, Y., AND SEO, J. 1992. A frame- REDDI, S., POULOVASSILIS, A., AND SMALL, C. 1995.
work for supporting triggers in object-ori- Extending a functional DBPL with ECA-
ented database systems. Int. J. Intel. Coop. rules. In Proceedings of the Second Interna-
Inf. Syst. 1, 1, 127–143. tional Workshop on Rules in Database Sys-
KOSCHEL, A., KRAMER, R., VON BULTZINGSLOEWEN, tems, T. Sellis, Ed., Springer-Verlag, 101–115.
G., BLEIBEL, T., KRUMLINDE, P., SCHMUCK, S., SCHWIDERSKI, S. 1996. Monitoring the behav-
AND WEINAND, C. 1997. Configurable active iour of distributed systems. Ph.D. Thesis,
functionality for Corba. In Proceedings of the University of Cambridge, United Kingdom.
Eleventh ECOOP Workshop 7 on CORBA. SIMON, E. AND KOTZ-DITTRICH, A. 1995. Prom-
KOTZ, A., DITTRICH, K., AND MULLE, J. 1988. ises and realities of active database systems.
Supporting semantic rules by a generalized In Proceedings of the 21st International Con-
event/trigger mechanism. In Proceedings of ference on Very Large Data Bases, U. Dayal,
Advance in Database Technology, EDBT P. Gray, and S. Nishio, Eds., Morgan-Kauf-
(Venice), 76 –91. mann, San Mateo, CA, 642– 653.
KULKARNI, K., MATTOS, N., AND COCHRANE, R. SKOLD, M. AND RISCH, T. 1995. Using partial
1999. Active database features in SQL-3. In differencing for efficient monitoring of de-
Active Rules in Database Systems. N. Paton, ferred complex rule conditions. In Proceedings
Ed., Springer-Verlag. of IEEE Data Engineering.
LEVY, A. AND SAGIV, Y. 1993. Queries indepen- STONEBRAKER, M. AND KEMNITZ, G. 1991. The
dent of updates. In Proceedings of the Nine- POSTGRES next-generation database man-

ACM Computing Surveys, Vol. 31, No. 1, March 1999


Active Database Systems • 103

agement system. Commun. ACM 34, 10 (Oct.), Real Time Database Systems (ARTDB), M.
78 –92. Berndtsson and J. Hansson, Eds., Springer-
STONEBRAKER, M., JHINGRAN, A., GOH, J., AND Verlag, 158 –169.
POTAMIANOS, S. 1990. On rules, procedures, WELLS, D., BLAKELEY, J., AND THOMPSON, C. 1992.
caching and views in database systems. In Architecture of an open object-oriented data-
Proceedings of ACM SIGMOD, 281–290. base management system. IEEE Comput. 25,
THOMAS, I. AND JONES, A. 1995. Design and im- 10 (Oct.).
plementation of an active object-oriented da- WIDOM, J. 1992. A denotational semantics for
tabase supporting construction of database the Starburst production rule language. SIG-
tools. In Proceedings of the Second Interna- MOD Rec. 21, 3, 4 –9.
tional Workshop on Rules in Database Sys-
tems, T. Sellis, Ed., Springer-Verlag, 147–164. WIDOM, J. AND FINKELSTEIN, S. 1990. Set-ori-
ented production rules in relational database
VAN DER VOORT, L. AND SIEBES, A. 1994.
systems. In Proceedings of the ACM SIGMOD
Enforcing confluence of rule execution. In Pro-
International Conference on Management of
ceedings of the First International Workshop
Data, 259 –270.
on Rules in Database Systems, N. Paton and
M. Williams, Eds., Springer-Verlag, 194 –207. WIDOM, J., COCHRANE, R., AND LINDSAY, B. 1991.
VON BUELTZINGSLOEWEN, G., KOSCHEL, A., LOCK-
Implementing set-oriented production rules
EMANN, P., AND WALTER, H. 1999. ECA
as an extension to Starburst. In Proceedings
functionality in a distributed environment. In of the Seventeenth International Conference on
Active Rules in Database Systems. Springer- Very Large Data Bases (Barcelona),
Verlag. R. C. G. M. Lohman and A. Sernadas, Eds.,
WANG, Y.-W. AND HANSON, E. 1992. A perfor- Morgan-Kaufmann, San Mateo, CA, 275–286.
mance comparison of the Rete and TREAT WINSTON, P. 1984. Artificial Intelligence (Sec-
algorithms for testing database rule condi- ond ed.). Addison-Wesley, Reading, MA.
tions. In Proc. of Data Engineering, 88 –97. ZANIOLO, C. 1994. A unified semantics for ac-
WEIK, T. AND HEURER, A. 1995. An algorithm tive and deductive databases. In Rules in
for the analysis of termination of large trigger Database Systems, N. Paton and M. Williams,
sets in an OODBMS. In Proceedings of Active Eds., Springer-Verlag.

Received November 1994; revised February 1998; accepted June 1998

ACM Computing Surveys, Vol. 31, No. 1, March 1999

View publication stats

You might also like