Nothing Special   »   [go: up one dir, main page]

skip to main content
article
Free access

Space optimization in deductive databases

Published: 01 December 1995 Publication History

Abstract

In the bottom-up evaluation of logic programs and recursively defined views on databases, all generated facts are usually assumed to be stored until the end of the evaluation. Discarding facts during the evaluation, however, can considerably improve the efficiency of the evaluation: the space needed to evaluate the program, the I/O costs, the costs of maintaining and accessing indices, and the cost of eliminating duplicates may all be reduced. Given an evaluation method that is sound, complete, and does not repeat derivation steps, we consider how facts can be discarded during the evaluation without compromising these properties. We show that every such space optimization method has certain components, the first to ensure soundness and completeness, the second to avoid redundancy (i.e., repetition of derivations), and the third to reduce “fact lifetimes” (i.e., the time period for which each fact must be retained during evaluation). We present new techniques based on providing bounds on the number of derivations and uses of facts, and using monotonicity constraints for each of the first two components, and provide novel synchronization techniques for the third component of a space optimization method. We describe how techniques for each of the three components can be combined in practice to obtain a space optimization method for a program. Our results are also of importance in applications such as sequence querying, and in active databases where triggers are defined over multiple “events.”

References

[1]
BALBIN, I., AND RAMAMOHANARAO, K. 1987. A generalization of the differential approach to recursive query evaluation. J. Logic Program. 4, 3 (Sept.), 259-262.
[2]
BANCILHON, F. 1985. Naive evaluation of rec. ursively defined relations. In On Knowledge Base Management Systems--Integrating Database and AI Systems, Brodie and Mylopoulos, Eds., Springer-Verlag, New York.
[3]
BEERI, C., AND RAMAKRISHNAN, R. 1991. On the power of Magic, J. Logic Program. 10, 3 & 4, 255-300.
[4]
DEBRAY, S. K., AND WARREN, D.S. 1989. Functional compositions in logic programs. Trans. Program. Lang. 11, 3 (July), 451-481.
[5]
GEHANI, N. H., JAGADISH, H. V., AND SHMUELI, O. 1992. Composite event specification in active databases: Model & implementation. Proceedings of the 18th International Conference on Very Large Databases (Vancouver, B.C., Aug.), 327-338.
[6]
HmSCHBER6, D. S. 1975. A linear space algorithm for computing maximal common subsequences. Commun. ACM 18, 6 (June), 341-343.
[7]
JAGADISH, H. V., MUMICK, I. S., AND SHMUELI, O. 1992. Events with attributes in an active database. Tech. Rep. AT & T Bell Laboratories.
[8]
KEMP, D., RAMAMOHANARAO, K., AND SOMOGYI, Z. 1990. Right-, left-, and multi-linear rule transformations that maintain context information. In Proceedtngs of the International Conference on Very Large Databases (Brisbane, Australia), 380-391.
[9]
KRISHNAMURTHY, R., RAMAKRISHNAN, R., AND SHMUELI, O. 1988. A framework for testing safety and effective computability of extended Datalog. In Proceedings of the ACM SIGMOD Internattonal Conference on Management of Data (Chicago, IL, May), 154-163.
[10]
LLOYD, J.W. 1987. Foundations ofLogtc Programmtng. 2nd ed., Springer-Verlag, New York.
[11]
MA~ER, M. J., AND RAMAKmSHNAN, R. 1989. D3jtl vu in fixpoints of logic programs. In Proceedrags of the Sympostum on Logtc Programming' (Cleveland, OH), 963-980.
[12]
NAUGHTON, J. F., AND RAMAKRISHNAN, R. 1994. How to forget the past without repeating it. J. ACM 41, 6, 1151-1177.
[13]
NAUGHTON, J. F., RAMAKmSHNAN, R., SAGIV, Y., AND ULLMAN, J.D. 1989. Efficient evaluation of fight-, left-, and multi-linear rules. In Proceedings of the ACM SIGMOD International Conference on Management of Data (Portland, OR, May), 235-242.
[14]
RAMAKmSHNAN, R. 1988. Magic templates: A spellbinding approach to logic programs. In Procee&ngs of the Internattonal Conference on Logic Programming' (Seattle, WA, Aug.), 140 159.
[15]
RAMAKRISttNAN, R., BEERI, C., AND KRISHNAMURTHY, R. 1988. Optimizing existential Datalog queries. In Proceedings of the ACM Symposium on Principles of Database Systems (Austin, TX, March), 89 102.
[16]
RAMAKmSHNAN, R., SRIVASTAVA, D., AND SUDARSHAN, S. 1994. Rule ordering in bottom-up fixpoint evaluation of logic programs. IEEE Trans. Knowl. Data Eng. (August). (A preliminary version appeared in VLDB, 1990).
[17]
ROTH, W. G., RAMAKRISHNAN, R., AND SESHADm, P. 1993. MIMSY: A system for analyzing time series data in the stock market domain. In Procee&ngs of the Workshop on Programming with Logic Databases (Vancouver, B.C.), R. Ramakrishnan, Ed., 33 43.
[18]
SESHADRI, P., LIVNY, M., AND RAMAKRISHNAN, a. 1994. Sequence query processing. In Proceedings of the ACM SIGMOD Conference on Management of Data. (Minneapolis, MN), 430-441.
[19]
SHMUELI, O. 1987. Decidability and expressiveness aspects of logic queries. In Procee&ngs of the ACM Symposium on Principles of Database Systems, 237-249.
[20]
SRIVASTAVA, D., SUDARSHAN, S., RAMAKRISHNAN, R., AND NAUGHTON, J. 1991. Space optimization in deductive databases. Tech. Rep. 1063, University of Wisconsin, Madison.
[21]
TSUR, S., OLKEN, F., AND NAOR, D. 1990. Deductive databases for genom~c mapping. Tech. Rep. TR-CS-90-14 ( Proceedtngs of the NACLP 93 Workshop on Deductive Databases), Kansas State University.
[22]
ULLMAN, J.D. 1989. Princtples of Database and Knowledge-Base Systems, Volumes I and H. Computer Science Press, New York.

Cited By

View all
  • (2019)Dynamically ordered semi-naive evaluation of recursive queriesInformation Sciences: an International Journal10.1016/S0020-0255(96)00160-096:3-4(237-269)Online publication date: 5-Jan-2019
  • (2015)On the Efficiency of Query-Subquery Nets with Right/Tail-Recursion Elimination in Evaluating Queries to Horn Knowledge BasesAdvanced Computational Methods for Knowledge Engineering10.1007/978-3-319-17996-4_22(243-254)Online publication date: 2015
  • (2004)Generalization of ZYT-linearizability for bilinear datalog programsInformation and Computation10.1016/S0890-5401(03)00172-X188:1(77-98)Online publication date: 10-Jan-2004

Recommendations

Reviews

Robert J. Tufts

Space optimization can often be critical for string matching situations that use deductive databases. Examples include comparisons of DNA strings, change detection between digital images, and sequence querying in stock market applications to create summary statistics. Each of these processes, usually performed as bottom-up evaluations, can hog storage and I/O processing if the generated facts used for evaluation are all stored until the end of the process. There has been some earlier research into practical methods for reducing the number of facts that are saved and the number of repeated occurrences of the same derivation of facts. One of these techniques, the sliding window tabulation technique [1], has proven effective, but is applicable to a restricted class of programs. The authors have expanded on sliding window tabulation by defining a general framework for space optimization methods and creating a series of techniques that apply to a wider class of programs. They propose implementing these techniques during the compilation of each deductive database query. The query program would be evaluated to see which techniques are best. The chosen techniques would then be included in the compiled program and executed during query runtime to discard facts and eliminate duplicate fact derivation. The proposed techniques also ensure correctness, nonredundancy of derivation, and reduction in the time a fact is retained. The authors' purpose in writing this paper was to provide a broader set of techniques for reducing the space required during bottom-up evaluation of logic programs. The theorems and techniques provided admirably satisfy this purpose and carry the theory into practical applications for database queries. Some of the discussion is a bit tedious, but it is needed to prove that the techniques satisfy the need for soundness and completeness, nonredundancy, and reduction of fact lifetimes. One of the most enjoyable aspects of the paper is its readability. The authors do a good job of providing background information, deriving proofs of theorems, and showing examples where the techniques are applicable. The references, however, could have been improved. Eleven of the 22 references are to works by the same authors, either collaboratively or separately, and only a few of the remaining references cover space optimization in deductive databases. The paper is an excellent look into practical aspects of storage optimization for bottom-up query problems. As such, it is important to vendors of relational query packages, especially if they are focusing on bottom-up or recursive evaluations of fact databases. I also recommend the paper for those doing additional research, as suggested by the authors, into evaluation primitives for easily implementing the space optimization techniques.

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Transactions on Database Systems
ACM Transactions on Database Systems  Volume 20, Issue 4
Dec. 1995
152 pages
ISSN:0362-5915
EISSN:1557-4644
DOI:10.1145/219035
  • Editor:
  • Won Kim
Issue’s Table of Contents

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 December 1995
Published in TODS Volume 20, Issue 4

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. bottom-up query evaluation deductive database systems
  2. discarding facts
  3. logic programming

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)52
  • Downloads (Last 6 weeks)8
Reflects downloads up to 12 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2019)Dynamically ordered semi-naive evaluation of recursive queriesInformation Sciences: an International Journal10.1016/S0020-0255(96)00160-096:3-4(237-269)Online publication date: 5-Jan-2019
  • (2015)On the Efficiency of Query-Subquery Nets with Right/Tail-Recursion Elimination in Evaluating Queries to Horn Knowledge BasesAdvanced Computational Methods for Knowledge Engineering10.1007/978-3-319-17996-4_22(243-254)Online publication date: 2015
  • (2004)Generalization of ZYT-linearizability for bilinear datalog programsInformation and Computation10.1016/S0890-5401(03)00172-X188:1(77-98)Online publication date: 10-Jan-2004

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media