Skip to main content
Log in

Counting and topological order

  • Regular Papers
  • Published:
Journal of Computer Science and Technology Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Aly H, Ozsoyoglu Z M. Synchronized counting method. InProc. the 5th Int’l Conf. on Data Engineering, Los Angeles, 1989.

  2. 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.

  3. 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.

  4. Beeri C, Ramakrishnan R. On the power of magic.International Journal of Logic Programming, 1991, 10: 255–299.

    Article  MATH  MathSciNet  Google Scholar 

  5. Ceri S, Gottlob G, Tanca L. Logic Programming and Databases. Springer-Verlag, Berlin, 1990.

    Google Scholar 

  6. 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.

    Google Scholar 

  7. 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.

    Chapter  Google Scholar 

  8. 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.

    Google Scholar 

  9. 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.

    Chapter  Google Scholar 

  10. Chen Y. Magic sets and stratified databases.International Journal of Intelligent Systems, 1997, 12: 203–231.

    Article  MATH  Google Scholar 

  11. Chen Y. Magic sets revisited.Journal of Computer Science and Technology, 1997, 12(4): 346–365.

    Article  MATH  MathSciNet  Google Scholar 

  12. 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.

  13. Han J, Henschen L J. The level-cycle merging method. InProc. the 1st Int’l Conf. on Deductive and Object-Oriented Databases, Kyoto, 1989.

  14. 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.

  15. Marchetti-Spaccamela A, Pelaggi A, Sacca D. Worst case compexity analysis of methods for logic query implementation. InProc. ACM-PODS, 1987.

  16. Marchetti-Spaccamela A, Pelaggi A, Sacca D. Comparison of methods for logic-query implementation.J. Logic Programming, 1991, 10: 333–360.

    Article  MATH  MathSciNet  Google Scholar 

  17. Sacca D, Zaniolo C. Magic counting method. InProc. ACM-SIGMOD, May 1987.

  18. 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.

  19. Knuth D E. The Art of Computer Programming. Addison-Wesley Series in Computer Science and Information Processing, 1968, pp.257–265.

Download references

Author information

Authors and Affiliations

Authors

Additional information

For the biography of Chen Yangjun please refer to p.365 No.4, Vol.12 of this Journal.

Rights and permissions

Reprints 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

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF02947202

Keywords

Navigation