Abstract
The counting method is a simple and efficient method for processing linear recursive datalog queries. Its time complexity is bounded byO(n·e), wheren ande denote the numbers of nodes and edges, respectively, in the graph representing the input relations. In this paper, the concepts ofheritage appearance, function andheritage selection function are introduced, and an evaluation algorithm based on the computation of such functions in topological order is developed. This new algorithm requires only linear time in the case of non-cyclic data.
Similar content being viewed by others
References
Aly H, Ozsoyoglu Z M. Synchronized counting method. InProc. the 5th Int’l Conf. on Data Engineering, Los Angeles, 1989.
Balbin G S, Port K Ramamohanarao, Meenakshi K. Efficient bottom-up computation of queries on stratified databases.J. Logic Programming, November 1991, pp.295–344.
Bancilhon F, Maier D, Sagiv Y, Ullman J D. Magic sets and other strange ways to implement logic programs. InProc. 5th ACM Symp. Principles of Database systems, Cambridge, MA, March 1986, pp.1–15.
Beeri C, Ramakrishnan R. On the power of magic.International Journal of Logic Programming, 1991, 10: 255–299.
Ceri S, Gottlob G, Tanca L. Logic Programming and Databases. Springer-Verlag, Berlin, 1990.
Chen Y, Haerder T. Improving RQA/FQI recursive query algorithm. InProc. ISMM — First Int’l Conf. on Information and Knowledge Management, Baltimore, Maryland, USA, ACM, Nov. 1992.
Chen Y. A bottom-up query evaluation method for stratified databases. InProc. 9th Int’l Conf. on Data Engineering, Vienna, Austria: IEEE, April 1993, pp.568–575.
Chen Y, Haerder T. On the optimal top-down evaluation of recursive queries. InProc. 5th Int’l Conf. on Database and Expert Systems Applications, Greece, Athens: Springer-Verlag, Sept. 1994, pp.47–56.
Chen Y, Haerder T. An optimal graph traversal algorithm for evaluating linear binary-chain programs. InProc. CIKM’94 — The 3rd Int’l Conf. on Information and Knowledge Management, Gaithersburg, Maryland: ACM, Nov. 1994, pp.34–41.
Chen Y. Magic sets and stratified databases.International Journal of Intelligent Systems, 1997, 12: 203–231.
Chen Y. Magic sets revisited.Journal of Computer Science and Technology, 1997, 12(4): 346–365.
Haddad R W, Naughton J F. Counting method for cyclic relations. InProc. the 7th ACM SIGMOD-SIGACT Symp. on Principles of Database Systems, 1986, pp.16–23.
Han J, Henschen L J. The level-cycle merging method. InProc. the 1st Int’l Conf. on Deductive and Object-Oriented Databases, Kyoto, 1989.
Wu C, Henschen L J. Answering linear recursive queries in cyclic databases. InProc. the 1988 Int’l Conf. on Fifth Generation Computer Systems, Tokyo, 1988.
Marchetti-Spaccamela A, Pelaggi A, Sacca D. Worst case compexity analysis of methods for logic query implementation. InProc. ACM-PODS, 1987.
Marchetti-Spaccamela A, Pelaggi A, Sacca D. Comparison of methods for logic-query implementation.J. Logic Programming, 1991, 10: 333–360.
Sacca D, Zaniolo C. Magic counting method. InProc. ACM-SIGMOD, May 1987.
Vieille L. From QSQ to QoSaQ: Global optimization of recursive queries. InProc. 2nd Int’l Conf. on Expert Database System, Kerschberg L (ed.), Charleston, 1988.
Knuth D E. The Art of Computer Programming. Addison-Wesley Series in Computer Science and Information Processing, 1968, pp.257–265.
Author information
Authors and Affiliations
Additional information
For the biography of Chen Yangjun please refer to p.365 No.4, Vol.12 of this Journal.
Rights and permissions
About this article
Cite this article
Chen, Y. Counting and topological order. J. of Comput. Sci. & Technol. 12, 497–509 (1997). https://doi.org/10.1007/BF02947202
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF02947202