@techreport{R-94-10, TITLE = {Compiling Active Object-Relational Rule Conditions into Partially Diffirentiated Relations}, AUTHOR = {Martin Sk{\"o}ld and Tore Risch}, YEAR = {1994}, NUMBER = {R-94-10}, INSTITUTION = ida, ADDRESS = idaaddr, ABSTRACTURL = {/publications/cgi-bin/tr-fetch.pl?r-94-10+abstr}, ABSTRACT = {We present ongoing work on tightly integrating active rules with a next generation object-oriented(OO) database system having transactions and a relationally complete OO query language. The rules are defined as Condition Action (CA) pairs that can be parameterized, overloaded, and generic. The condition part of a rule is defined as a declarative OO query and the action as procedural statements. Rule condition monitoring must be efficient with respect to processor time and memory utilization. To meet these goals, a number of techniques have been developed for compilation and evaluation of rule conditions. The techniques permit efficient of deferred rules, i.e. rules whose executions are deferred until a check phase usually occurring when a transaction is committed. The techniques do not assume permanent materializations, but this can be added as an optimization option. A rule compiler generates screener predicates and partially differentiated relations. Screener predicates screen physical events as they are logged in order to efficiently capture those events that influence activated rules. Physical events that pass through screeners are accumulated. At the check phase the accumulated changes are incrementally propagated to the relations that they affect in order to determine whether some rule condition has changed. Partial differentiation is defined formally as a way for the rule compiler to automatically generate partially differentiated relations The technique assumes that the number of updates in a transaction is small and therefore usually onlysome of the partially differentiated relations need to be propagated. Cost based optimization techniques are utilized for both screener predicates and partially differentiated relations. The paper introduces a calculus for incremental evaluation based on partial differentiation. It also presents a propagation algorithm based on the calculus.}, IDANR = {LiTH-IDA-R-94-10}, NOTE = {Presented at the Dagstuhl-Seminar on Active Databases, Schloss, Dagstuhl, Germany, March 1994}