On the Efficiency of Query-Subquery Nets with Right/Tail-Recursion Elimination in Evaluating Queries to Horn Knowledge Bases

  • Son Thanh CaoEmail author
Conference paper
Part of the Advances in Intelligent Systems and Computing book series (AISC, volume 358)


We propose a method called QSQN-rTRE for evaluating queries to Horn knowledge bases. It is an extension of QSQN-TRE by applying elimination not only to the tail-recursive predicates but also to all the intensional predicates that appear rightmost in the bodies of the program clauses. The aim is to avoid materializing intermediate results for the mentioned cases during the processing. As a consequence, it takes the advantage of reducing the number of kept tuples and subqueries in the computer memory as well as the number of read/write operations on relations. The efficiency of our method is illustrated by empirical results.


Horn knowledge bases deductive databases query processing optimization methods QSQ QSQN QSQN-TRE QSQN-rTRE 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Abiteboul, S., Hull, R., Vianu, V.: Foundations of Databases. Addison Wesley (1995)Google Scholar
  2. 2.
    Bancilhon, F., Maier, D., Sagiv, Y., Ullman, J.D.: Magic sets and other strange ways to implement logic programs. In: Proceedings of PODS 1986, pp. 1–15. ACM (1986)Google Scholar
  3. 3.
    Cao, S.T.: On the efficiency of Query-Subquery Nets: an experimental point of view. In: Proceedings of SoICT 2013, pp. 148–157. ACM (2013)Google Scholar
  4. 4.
    Cao, S.T.: An Implementation of the QSQN-rTRE Evaluation Methods (2014),
  5. 5.
    Cao, S.T., Nguyen, L.A.: An Improved Depth-First Control Strategy for Query-Subquery Nets in Evaluating Queries to Horn Knowledge Bases. In: van Do, T., Le Thi, H.A., Nguyen, N.T. (eds.) Advanced Computational Methods for Knowledge Engineering. AISC, vol. 282, pp. 281–295. Springer, Heidelberg (2014)CrossRefGoogle Scholar
  6. 6.
    Cao, S.T., Nguyen, L.A.: An Empirical Approach to Query-Subquery Nets with Tail-Recursion Elimination. In: Bassiliades, N., Ivanovic, M., Kon-Popovska, M., Manolopoulos, Y., Palpanas, T., Trajcevski, G., Vakali, A. (eds.) New Trends in Database and Information Systems II. AISC, vol. 312, pp. 109–120. Springer, Heidelberg (2015)Google Scholar
  7. 7.
    Cao, S.T., Nguyen, L.A., Szalas, A.: The Web Ontology Rule Language OWL 2 RL+ and Its Extensions. T. Computational Collective Intelligence 13, 152–175 (2014)Google Scholar
  8. 8.
    Cao, S.T., Nguyen, L.A., Szalas, A.: WORL: a nonmonotonic rule language for the Semantic Web. Vietnam J. Computer Science 1(1), 57–69 (2014)CrossRefGoogle Scholar
  9. 9.
    Freire, J., Swift, T., Warren, D.S.: Taking I/O seriously: Resolution reconsidered for disk. In: Naish, L. (ed.) Proc. of ICLP 1997, pp. 198–212. MIT Press (1997)Google Scholar
  10. 10.
    Madalińska-Bugaj, E., Nguyen, L.A.: A generalized QSQR evaluation method for Horn knowledge bases. ACM Trans. on Computational Logic 13(4), 32 (2012)MathSciNetzbMATHGoogle Scholar
  11. 11.
    Nguyen, L.A., Cao, S.T.: Query-Subquery Nets. In: Nguyen, N.-T., Hoang, K., Jędrzejowicz, P. (eds.) ICCCI 2012, Part I. LNCS, vol. 7653, pp. 239–248. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  12. 12.
    Ramakrishnan, R., Beeri, C., Krishnamurthy, R.: Optimizing existential datalog queries. In: Proceedings of PODS 1988, pp. 89–102. ACM (1988)Google Scholar
  13. 13.
    Ramakrishnan, R., Srivastava, D., Sudarshan, S.: Efficient bottom-up evaluation of logic programs. In: Vandewalle, J. (ed.) The State of the Art in Computer Systems and Software Engineering. Kluwer Academic Publishers (1992)Google Scholar
  14. 14.
    Ross, K.A.: Tail recursion elimination in deductive databases. ACM Trans. Database Syst. 21(2), 208–237 (1996)CrossRefGoogle Scholar
  15. 15.
    Srivastava, D., Sudarshan, S., Ramakrishnan, R., Naughton, J.F.: Space optimization in deductive databases. ACM Trans. DB. Syst. 20(4), 472–516 (1995)CrossRefGoogle Scholar
  16. 16.
    Sudarshan, S., Srivastava, D., Ramakrishnan, R., Naughton, J.F.: Space optimization in the bottom-up evaluation of logic programs. In: Proceedings of SIGMOD 1991, pp. 68–77. ACM Press (1991)Google Scholar
  17. 17.
    Tamaki, H., Sato, T.: OLD resolution with tabulation. In: Shapiro, E. (ed.) ICLP 1986. LNCS, vol. 225, pp. 84–98. Springer, Heidelberg (1986)CrossRefGoogle Scholar
  18. 18.
    Vieille, L.: Recursive axioms in deductive databases: The query/subquery approach. In: Proceedings of Expert Database Conf., pp. 253–267 (1986)Google Scholar
  19. 19.
    Vieille, L.: Recursive query processing: The power of logic. Theor. Comput. Sci. 69(1), 1–53 (1989)MathSciNetCrossRefzbMATHGoogle Scholar
  20. 20.
    Zhou, N.-F., Sato, T.: Efficient fixpoint computation in linear tabling. In: Proceedings of PPDP 2003, pp. 275–283. ACM (2003)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  1. 1.Faculty of Information TechnologyVinh UniversityVinhVietnam
  2. 2.Institute of InformaticsUniversity of WarsawWarsawPoland

Personalised recommendations