Abstract
We give a method for improving the efficiency of condition evaluation during rule processing in active database systems. The method derives, from a rule condition, two new conditions that can be used in place of the original condition when a previous value (true or false) of the original condition is known. The derived conditions are generally more efficient to evaluate than the original condition because they are incremental—they replace references to entire database relations by references to delta relations, which typically are much smaller. Delta relations are accessible to rule conditions in almost all current active database systems, making this optimization broadly applicable. We describe an attribute grammar based approach that we have used to implement our condition rewriting technique.
This work was partially performed while the authors were at the IBM Almaden Research Center, San Jose, CA. At Stanford this work was supported by the Anderson Faculty Scholar Fund and by equipment grants from Digital Equipment Corporation and IBM Corporation.
Preview
Unable to display preview. Download preview PDF.
References
A. Aho, R. Sethi, and J. Ullman. Compilers: principles, techniques, and tools. Addison-Wesley, Reading, Massachusetts, 1986.
E. Baralis. An Algebraic Approach to the Analysis and Optimization of Active Database Rules. PhD thesis, Politecnico di Torino, Torino, Italy, Feb. 1994.
E. Baralis, S. Ceri, G. Monteleone, and S. Paraboschi. An intelligent database system application: The design of EMS. In Proc. of the First Int. Conf. on Applications of Databases, LNCS 851, Vadstena, Sweden, June 1994. Springer-Verlag.
S. Ceri and G. Gottlob. Translating SQL into relational algebra: Optimization, semantics, and equivalence of SQL queries. IEEE Trans. Softw. Eng., 11(4):324–345, Apr. 1985.
S. Ceri and R. Manthey. Consolidated specification of Chimera, the conceptual interface of Idea. Technical Report IDEA.DD.2P.004, Politecnico di Milano, Milan, Italy, June 1993.
S. Ceri and J. Widom. Deriving production rules for constraint maintenance. In Proc. of the Sixteenth Int. Conf. on Very Large Data Bases, pages 566–577, Brisbane, Australia, Aug. 1990.
F. Fabret, M. Regnier, and E. Simon. An adaptive algorithm for incremental evaluation of production rules in databases. In Proc. of the Nineteenth Int. Conf. on Very Large Data Bases, pages 455–466, Dublin, Ireland, Aug. 1993.
S. Ghandeharizadeh, R. Hull, D. Jacobs, et al. On implementing a language for specifying active database execution models. In Proc. of the Nineteenth Int. Conf. on Very Large Data Bases, Dublin, Ireland, Aug. 1993.
E. Hanson. Rule condition testing and action execution in Ariel. In Proceedings of the ACM SIGMOD Int. Conf. on Management of Data, pages 49–58, San Diego, California, June 1992.
S. Johnson. YACC — yet another compiler compiler. Technical Report CSTR 32, Bell Laboratories, Murray Hill, New Jersey, 1975.
M. Lesk. LEX — a lexical analyzer generator. Technical Report CSTR 39, Bell Laboratories, Murray Hill, New Jersey, 1975.
X. Qian and G. Wiederhold. Incremental recomputation of active relational expressions. IEEE Trans. on Knowledge and Data Eng., 3(3):337–341, Sept. 1991.
A. Rosenthal, S. Chakravarthy, B. Blaustein, and J. Blakeley. Situation monitoring for active databases. In Proc. of the Fifteenth Int. Conf. on Very Large Data Bases, pages 455–464, Amsterdam, The Netherlands, Aug. 1989.
E. Simon, F. Fabret, F. Llirbat, and D. Tombroff. Triggers and transactions: Performance issues. In Proc. of the PUC Rio DB Workshop on New Database Research Challenges, pages 53–64, Rio de Janeiro, Brazil, Sept. 1994.
E. Simon, J. Kiernan, and C. de Maindreville. Implementing high level active rules on top of a relational DBMS. In Proc. of the Eighteenth Int. Conf. on Very Large Data Bases, pages 315–326, Vancouver, British Columbia, Aug. 1992.
M. Sköld and T. Risch. Compiling active object-oriented relational rule conditions into partially differentiated relations. Technical Report LiTH-IDA-R-94-10, Linköping University, Linköping, Sweden, Mar. 1994.
M. Stonebraker, A. Jhingran, J. Goh, and S. Potamianos. On rules, procedures, caching and views in data base systems. In Proc. of the ACM SIGMOD Int. Conf. on Management of Data, pages 281–290, Atlantic City, New Jersey, May 1990.
Y.-W. Wang and E. Hanson. A performance comparison of the Rete and TREAT algorithms for testing database rule conditions. In Proc. of the Eighth Int. Conf. on Data Engineering, Phoenix, Arizona, Feb. 1992.
J. Widom and S. Ceri. Active Database Systems: Triggers and Rules for Advanced Database Processing. Morgan Kaufmann, San Francisco, California, 1995.
J. Widom, R. Cochrane, and B. Lindsay. Implementing set-oriented production rules as an extension to Starburst. In Proc. of the Seventeenth Int. Conf. on Very Large Data Bases, pages 275–285, Barcelona, Spain, Sept. 1991.
J. Widom and S. Finkelstein. Set-oriented production rules in relational database systems. In Proc. of the ACM SIGMOD Int. Conf. on Management of Data, pages 259–270, Atlantic City, New Jersey, May 1990.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1995 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Baralis, E., Widom, J. (1995). Using delta relations to optimize condition evaluation in active databases. In: Sellis, T. (eds) Rules in Database Systems. RIDS 1995. Lecture Notes in Computer Science, vol 985. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-60365-4_134
Download citation
DOI: https://doi.org/10.1007/3-540-60365-4_134
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-60365-8
Online ISBN: 978-3-540-45137-2
eBook Packages: Springer Book Archive