The processing and evaluation of transitive closure queries

  • Jiawei Han
  • Ghassen Qadah
  • Chinying Chaou
Databases And Logic
Part of the Lecture Notes in Computer Science book series (LNCS, volume 303)


A transitive closure operator will be an important new operator in future deductive database systems. We discuss the compilation of recursive rule clusters into formulas containing transitive closure operations and study three promising algorithms for the processing of transitive closure queries: the wavefront algorithm, the δ-wavefront algorithm and the level-relaxed δ-wavefront algorithm. The relative processing efficiency of these algorithms are analyzed and compared based on different database structures and accessing methods. Our study shows that the δ-wavefront algorithm performs consistently better than the wavefront algorithm, and the level-relaxed δ-wavefront algorithm has high potential of further reducing I/O accessing cost on the databases with clustered derivation paths. The study also provides some interesting heuristics on the database structures and implementation techniques in the processing of recursive database queries.


Main Memory Hash Table Transitive Closure Base Relation Total Execution Time 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References References

  1. 1.
    R. Agrawal and H. Jagadish, Direct Algorithms for Computing the Transitive Closure of Database Relations, Proceedings of the 13th International Conference on Very Large Data Bases, Brighton, England, Sept. 1987.Google Scholar
  2. 2.
    A. Aho and J. D. Ullman, Universality of Data Retrieval Languages, Proceedings of the 6th ACM Symposium on Programming Languages, San Antonio, Texas, Jan. 1979.Google Scholar
  3. 3.
    E. Babb, Implementation of Relational Database by Means of Specialized Hardware, ACM Transactions on Database Systems 6(2),, 1979.Google Scholar
  4. 4.
    F. Bancilhon, Naive Evaluation of Recursively Defined Relations, On Knowledge Base Management Systems (M. Brodie and J. Mylopoulos eds.), Springer-Verlag,, 1986.Google Scholar
  5. 5.
    F. Bancilhon, D. Maier, Y. Sagiv and J. D. Ullman, Magic Sets and Other Strange Ways to Implement Logic Programs, Proceedings of 5th ACM Symposium on Principles of Database Systems, Cambridge, MA, 1986.Google Scholar
  6. 6.
    F. Bancilhon and R. Ramakrishnan, An Amateur's Introduction to Recursive Query Processing Strategies, Proceedings of 1986 ACM-SIGMOD Conference on Management of Data, Washington, DC, May 1986.Google Scholar
  7. 7.
    D. J. DeWitt, et. al., Implementation Techniques for Main Memory Database Systems, Proceedings of 1984 ACM-SIGMOD Conference on Management of Data,, June 1984.Google Scholar
  8. 8.
    J. R. Goodman, An Investigation of Multiprocessor Structures and Algorithms for Database Management, Mem No. UCB/ERLM81, University of California-Berkeley,, May 1981.Google Scholar
  9. 9.
    J. Han, Pattern-Based and Knowledge-Directed Query Compilation in Recursive Data Bases, Computer Science Department Technical Report No. 629 (Ph.D. Dissertation), University of Wisconsin at Madison, Dec. 1985.Google Scholar
  10. 10.
    J. Han and L. J. Henschen, Compiling and Processing Transitive Closure Queries in Relational Database Systems, EECS Tech. Rep. 86-06-DBM-02, Northwestern University, 1986, submitted for publication.Google Scholar
  11. 11.
    J. Han and L. J. Henschen, Handling Redundancy in the Processing of Recursive Database Queries, Proceedings of the 1987 ACM-SIGMOD Conference on Management of Data, San Fransisco, CA, May 1987.Google Scholar
  12. 12.
    J. Han, Multi-Chain Recursion and Its Query Processing Methods, submitted for publication,, 1987.Google Scholar
  13. 13.
    J. Han, Compiling Single-Chain Recursion by Variable Connection Graph Analysis, submitted for publication,, 1987.Google Scholar
  14. 14.
    L. J. Henschen and S. Naqvi, On Compiling Queries in Recursive First-Order Databases, J. ACM 31(1),, 1984.Google Scholar
  15. 15.
    Y. E. Ioannidis, A. Time Bound on the Materialization of Some Recursively Defined Views, Proceedings of the 11th International Conference on Very Large Data Bases, Stockholm, Sweden, Aug. 1985.Google Scholar
  16. 16.
    R. Kowalski, Logic for Problem Solving, American Elsevier, 1979.Google Scholar
  17. 17.
    H. Lu, K. Mikkilineni and J. Richardson, Design and Evaluation of Algorithms to Compute the Transitive Closure of a Database Relation, Proceedings of 1987 Data Engineering Conference, Los Angeles, CA, Feb. 1987.Google Scholar
  18. 18.
    J. F. Naughton, Data Independent Recursion in Deductive Databases, Proceedings of 5th ACM Symposium on Principles of Database Systems, Cambridge, MA, 1986.Google Scholar
  19. 19.
    J. F. Naughton, One-Sided Recursion, Proceedings of 6th ACM Symposium on Principles of Database Systems, San Diego, CA, 1987.Google Scholar
  20. 20.
    G. Z. Qadah, The Join Operation on a Multiprocessor Database Machine: Algorithms and the Evaluation of their Performance, Proceedings of 4th International Workshop on Database Machines,, 1985.Google Scholar
  21. 21.
    J. D. Ullman, Implementation of Logical Query Languages for Databases, ACM Transactions on Database Systems 10(3),, 1985.Google Scholar
  22. 22.
    P. Valduriez and G. Gardarin, Join and Semijoin Algorithms for a Multiprocessor Database Machine, ACM Transactions on Database Systems 9(1),, 1984.Google Scholar
  23. 23.
    P. Valduriez and H. Boral, Evaluation of Recursive Queries Using Join Indices, Proceedings of the 1st International Conference on Expert Database Systems, Charleston, SC, April 1986.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1988

Authors and Affiliations

  • Jiawei Han
    • 1
  • Ghassen Qadah
    • 2
  • Chinying Chaou
    • 2
  1. 1.Simon Fraser UniversityCanada
  2. 2.Northwestern UniversityUSA

Personalised recommendations