Distributed Evaluation of the Datalog Query Language

  • Lars Stefan Jensen
  • Erik Johannes Kaae


We present a technique for distributed evaluation of the deductive database language datalog, that is, prolog without function symbols. Datalog is both a powerful extension of relational database query languages like sql and a suitable language for constructing expert systems. Both of these types of applications tend to be computationally complex and to exhibit parallelism of the kinds known as Or parallelism and All-solutions And parallelism. We therefore expect large speedup by exploiting this parallelism.

The lack of function symbols ensures a finite model, in spite of presence of recursive clauses. We therefore discuss how to ensure termination while retaining completeness. Our distributed implementation uses a top/down interpretation strategy and is based on the problem-heap paradigm and dynamic load balancing. Tests show up to 14.2 times speedup, obtained on a Transputer network containing 16 Transputers.


Deductive Database Unit Clause Parallel Evaluation Dynamic Load Balance DATALOG Program 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    L. L. Alty and M. J. Coombs: Expert Systems, Concepts and Examples. NCC Publications, 1984.Google Scholar
  2. [2]
    K. R. Apt, H. A. Blair and A. Walker: Towards a Theory of Declarative Knowledge. In J. Minker (ed.): Foundations of Deductive Databases and Logic Programming, edt. J. Minker. Morgan Kaufmann Publ. 1988.Google Scholar
  3. [3]
    F. Bancilhon, R. Ramakrishnan: An Amateur’s Introduction to Recursive Query Processing Strategies. Proceedings of the ACM SIGMOD ‘86, Washington D.C., 1986.Google Scholar
  4. [4]
    J. S. Conery: Parallel Execution of Logic Programs. Kluwer Academic Publishers, 1987.Google Scholar
  5. [5]
    R. Davis, B. Buchanan and E. Shortliffe: Production Rules as a Representation for a Knowledge-Based Consultation Program. Artificial Intelligence 8 (1), 1977, 15–45.Google Scholar
  6. [6]
    D. DeGroot: Restricted AND-Parallelism. International conference on Fifth Generation Computer Systems 1984.Google Scholar
  7. [7]
    S. Ganguly, A. Silberschatz and S. Tsur: A Framework for the Parallel Processing of Datalog Queries. Department of Computer Science, The University of Texas at Austin, March 1989.Google Scholar
  8. [8]
    P. Gronning, T.Q. Nielsen and H.H. Lovengreen: Development of an algorithm for Dynamic Load Balancing. Technical Report. Dept. of Computer Science, Technical University of Denmark.Google Scholar
  9. [9]
    L.S. Jensen, H.H. Lovengreen: Distributed Interpretation of DATALOG. Technical Report. Dept of Computer Science, Technical University of Denmark.Google Scholar
  10. [10]
    Y. Kiyoki et al: A Stream-Oriented Approach to Parallel Processing for Deductive Databases. 5th International Worpshop on Database Machines, 87. Google Scholar
  11. [11]
    P. Moller Nielsen, Jurgen Staunstrup: Problem-heap: A Paradigm for Multiprocessor Algorithms. Parallel Computing, Vol. 4, pp.63-74,1987. CrossRefGoogle Scholar
  12. [12]
    J.F. Nilsson: On The Compilation of a Domain-Based Prolog. Proceedings of IFIP’83, Paris, 1983. Google Scholar
  13. [13]
    D. E. Smith, M. R. Genesereth and M. L. Ginsberg: Controlling Recursive Inference. Artificial Intelligence 30 (1986), 343-389. MathSciNetMATHCrossRefGoogle Scholar
  14. [14]
    J. D. Ullman: Principles of Knowledge-Base Systems. Computer Science Press, 1988.Google Scholar
  15. [15]
    L. Vieille: Recursive axioms in Deductive Databases: The Query/Subquery approach. Proc. First Intl. Conference Expert Database Systems, Charleston, 1986. Google Scholar
  16. [16]
    O. Wolfson: Parallel Bottom-up Evaluation of Datalog Programs by Load Sharing. Technical report no. 564, TECHNION - Israel Institute of Technology, Computer Science Department, June 1989.Google Scholar

Copyright information

© Springer-Verlag/Wien 1990

Authors and Affiliations

  • Lars Stefan Jensen
    • 1
  • Erik Johannes Kaae
    • 1
  1. 1.Department of Computer ScienceTechnical University of DenmarkLyngbyDenmark

Personalised recommendations