Abstract
In this paper, an optimal method to handle cyclic and acyclic data relations in the linear recursive queries is proposed. High efficiency is achieved by integrating graph traversal mechanisms into a top-down evaluation. In such a way, the subsumption checks and the identification of cyclic data can be done very efficiently. First, based on the subsumption checks, the search space can be reduced drastically by avoiding any redundant expansion operation. In fact, in the case of non-cyclic data, the proposed algorithm requires only linear time for evaluating a linear recursive query. On the other hand, in the case of cyclic data, by using the technique for isolating strongly connected components a lot of answers can be generated directly in terms of the intermediate results and the relevant path information instead of evaluating them by performing algebraic operations. Since the cost of generating an answer is much less than that of evaluating an answer by algebraic operations, the time consumption for cyclic data can be reduced by an order of magnitude or more.
Similar content being viewed by others
References
Aly H, Ozsoyoglu Z M. Synchronized counting method. InProc. 5th Int’l Conf. Data Engineering, Los Angeles, 1989.
Balbin I, Port G S, Ramamohanarao K, Meenakshi K. Efficient bottom-up computation of queries on stratified databases.J. Logic Programming, Nov. 1991, 295–344.
Beeri C, Ramakrishna R. On the power of magic sets.Int’l J. Logic Programming, 1991, 10: 255–299.
Ceri S, Gottlob G, Tanca T. Logic Programming and Databases. Springer-Verlag, Berlin, 1990.
Chen Y. A bottom-up query evaluation method for stratified databases. InProceedings of 9th International Conference on Data Engineering, Vienna, Austria, April 1993, pp.568–575.
Chen Y, Härder T. An optimal graph traversal algorithm for evaluating linear binary-chain programs. InCIKM’94 — The 3rd International Conference on Information and Knowledge Managemen, Caithersburg, Maryland, USA; ACM, Nov. 1994, pp.34–41.
Chen Y, Härder T. On the optimal top-down evaluation of recursive queries. InProc. 5th Int’l DEXA Conf. Database and Expert Systems Applications, Greece, Springer-Verlag, Sept. 1994, pp.47–56.
Chen Y. Processing of recursive rules in knowledge-based systems—Algorithms for handling recursive rules and negative information and performance measurements.Ph.D. thesis, Computer Science Department, University of Kaiserslautern, Germany, Feb. 1995.
Chen Y. Magic sets revisited.Journal of Computer Science and Technology, July 1997, 12(4): 346–365.
Chen Y. Magic sets and stratified databases.Int’l Journal of Intelligent Systems, March 1997, 12(3): 203–231.
Chen Y. OLDT-based evaluation method for handling recursive queries in deductive databases. accepted byScience Sinica, 1997.
Chen Y. Counting and topological order.Journal of Computer Science and Technology, 1997, 12(6): 497–509.
Han J. Chain-based evaluation—A bridge linking recursive and nonrecursive query evaluation. InProc. 2nd Int’l Workshop on Research Issues on Data Engineering: Transaction and Query Processing, Los Alamitos, CA, February 1992, pp.132–139.
Ioannidis Y, Wong E. Towards an algebraic theory of recursion.Journal of the Association for Computing Machinery, April 1991, 38(2): 329–381.
Marchetti-Spaccamela A, Pelaggi A, Sacca D. Comparison of methods for logic-query implementation.J. Logic Programming, 1991, 10: 333–360.
Nejdl W. Recursive strategies for answering recursive queries—The RQA/FQI strategy. InProc. 13th VLDB Conf., Brighton 1987, pp.43–50.
Wu C, Henschen L J. Answering linear recursive queries in cyclic databases. InProc. 1988 Int’l Conf. Fifth Generation Computer Systems, Tokyo, 1988.
Vieille L. Recursive axioms in deductive databases: The query-subquery approach. InProc. First Int’l Conf. Expert Database System, L. Kerschberg (ed.), Charleston, 1986.
Vieille L. A databae complete proof procedure based on SLD resolution. InProc. 4th Int’l Conf. Logic Programming ICLP’87, Melbourne, Australia, May 1987.
Vieille L. From QSQ to QoSaQ: Global optimization of recursive queries. InProc. 2th Int’l Conf. Expert Database System, L. Kerschberg (ed.), Charleston, 1988.
Tarjan R: Depth-first search and linear graph algorithms.SIAM J. Comput., June 1972, 1(2): 146–140.
Lloyd J W. Foundation of Logic Programming. Springer-Verlag, Berlin, 1987.
Author information
Authors and Affiliations
Additional information
Chen Yangjun received his B.S. degree in information system engineering from the Technical Institute of Changsha, China in 1982, and his Diploma and Ph.D. degrees in computer science from the University of Kaiserslautern, Germany in 1990 and 1995, respectively. Dr. Chen is currently an Assistant Professor of the Technical University of Chemnitz-Zw2ickau, Germany. His research interests include deductive databases, federative databases, constraint satisfaction problem, graph theory and combinatorics. He has about 40 publications in these areas.
Rights and permissions
About this article
Cite this article
Chen, Y. Graph traversal and top-down evaluation of logic queries. J. of Comput. Sci. & Technol. 13, 300–316 (1998). https://doi.org/10.1007/BF02946620
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF02946620