This Article 
 Bibliographic References 
 Add to: 
Evaluating Recursive Queries in Distributed Databases
February 1993 (vol. 5 no. 1)
pp. 104-121

The execution of logic queries in a distributed database environment is studied. Conventional optimization strategies, such as the early evaluation of selection conditions and the clustering of processing to manipulate and exchange large sets of tuples, are redefined in view of the additional difficulties due to logic queries, in particular to recursive rules. In order to allow efficient processing of these logic queries, several program transformation techniques that attempt to minimize distribution costs based on the idea of semijoins and generalized semijoins in conventional databases are presented. Although local computation of semijoins is not possible for the general case, classes of programs are indicated for which these transformations succeed in producing set-oriented computation. Processes evaluating the recursive program in a distributed network are described, and an efficient method for testing the termination of the computation is developed. The approach is compared with sequential as well as dataflow-oriented evaluation.

[1] D. G. Tandem, "Nonstop SQL, A distributed, high performance, high availability implementation of SQL," Tech. Rep., Tandem, Apr. 1987.
[2] S. Tsur and C. Zaniolo, "Implementation of logical query languages for databases," inProc. Int. Conf. on Very Large Databases (VLDB), Kyoto, Japan, 1986.
[3] K. Morris, J. D. Ullman, and A. Van Gelder, "Design overview of the Nail! system," inProc. Int. Conf. Logic Programming, London, 1986.
[4] S. Kunifuji and H. Yokota, "Prolog and relational databases for fifth generation computer systems," inProc. Workshop on Logical Bases for Databases, Toulose, Dec. 1982.
[5] D. Saccà, D. Vermeir, A. D'Atri, S. G. Peterson, J. J. Snjiders, and N. Spyratos, "Description of the overall architecture of the KIWI system," inESPRIT 85: Status Report of Continuing Work. Amsterdam, The Netherlands: Elsevier North Holland, 1986.
[6] S. Ceri, S. C. Reghizzi, L. Lavazza, and R. Zicari, "ALGRES: A system for the specification and prototyping of complex databases," Tech. Rep. 87-018 and 88-014 (revised), Politecnico di Milano, 1987.
[7] W. Nejdl, "Recursive strategies for answering recursive queriesthe RQA/FQI strategy," inProc. 13th Int. Conf. Very Large Data Bases, Brighton, U.K., Sept. 1987.
[8] L. Vieille, "From QSQ toward QoSaQ: Global optimization of recursive queries," inProc. Int. Conf. on Expert Database Systems, Tysons Corner, VA, Apr. 1988.
[9] J. D. Ullman,Principles of Database and Knowledge Base Systems, vol. II:The New Technologies. Rockville, MD: Comput. Sci. Press, 1989.
[10] S. Ceri and G. Pelagatti,Principles of Distributed Databases. New York: McGraw-Hill, 1984.
[11] H. Yoo and S. Lafortune, "An intelligent search method for query optimization by semijoins,"IEEE Trans. Knowl. Data Eng., vol. 1, pp. 226-237, June 1989.
[12] F. Bancilhon, D. Maier, Y. Sagiv, and J. D. Ullman, "Magic sets and other strange ways to implement logic programs," inProc. 5th ACM Symp. Principles of Database Syst.(Cambridge, MA), Mar. 1986, pp. 1-15.
[13] C. Beeri and R. Ramakrishnan, "On the power of magic," inProc. 6th ACM Symp. Principles of Database Syst.(San Diego, CA), Mar. 1987, pp. 269-283.
[14] D. Sacca' and C. Zaniolo, "On the implementation of a simple class of logic queries for databases," inProc. ACM 1986 SIGMOD-SIGACT Symp. Principles Database Syst., Cambridge. MA, Mar. 1986.
[15] Sacca' and C. Zaniolo, "Magic counting methods," inProc. ACM-SIGMOD Conf., San Francisco, CA, May 1987.
[16] R. Williamset al., "R*: An overview of the architecture," inProc. Int. Conf. on Database Systems, Jerusalem, 1982.
[17] P. A. Bernstein, N. Goodman, E. Wong, G. L. Reeve, and J. Rothmie, "Query processing in a system for distributed database (SDD-I),"ACM Trans. Database Syst., vol. 6, Dec. 1981.
[18] S. Ceri, G. Gottlob, L. Tanca, and G. Wiederhold, "Magic semi-joins,"Inform. Proc. Lett., vol. 33, no. 2, pp. 97-108, 1989.
[19] Y. Kambayashi, M. Yashikawa, and S. Yajima, "Query processing for distributed databases using generalized semi-joins," inACM Proc. SIGMOD. pp. 151-160, 1982.
[20] A. Ghafoor and P. B. Berra, "An efficient communication structure for distributed commit protocols,"IEEE J. Selected Areas Commun., vol. 7, pp. 375-389, Apr. 1989.
[21] S. Ceri, G. Gottlob, and L. Tanca,Logic Programming and Databases. Berlin: Springer-Verlag, 1990.
[22] P. Bernstein and D. Chiu, "Using semijoins to solve relational queries,"J. ACM, vol. 28, no. 1, pp. 25-40, Jan. 1981.
[23] D. Chiu and Y. Ho, "A methodology for interpreting tree queries into optimal semi-join expressions," inProc. ACM SIGMOD, May 1980, pp. 169-178.
[24] W. Nejdl, "Query processing in a deductive Prolog/RDBMS system," Ph.D. dissertation, Tech. Univ. of Vienna, Apr. 1988.
[25] L. Vieille, "Database-complete proof procedures based on SLD resolution," inProc. Int. Conf. on Logic Programming, Melbourne, May 1987, pp. 74-103.
[26] J. F. Naughton, "One-sided recursions," inProc. 6th ACM Symp. Principles of Database Syst., San Diego, CA, Mar. 1987, pp. 340- 348.
[27] A. Marchetti-Spaccamela, A. Pelaggi, and D. Sacca, "Worst-case complexity analysis of methods for logic query implementation," inProc. 6th ACM Symp. Principles of Database Syst.(San Diego, CA), Mar. 1987, pp. 294-301.
[28] C. Beeri, P. Kanellakis, F. Bancilhon, and R. Ramakrishnan, "Bounds on the propagation of selection into logic programs," inProc. 6th ACM Symp. Principles of Database Syst., San Diego, CA, Mar. 1987, pp. 214-226.
[29] S. Sippu and E. Soisalon-Soininen, "An optimization strategy for recursive queries in logic databases," inProc. Int. IEEE Conf. on Data Engineering, 1988, pp. 470-477.
[30] L. J. Henschen and S. Naqvi, "On compiling queries in recursive first-order databases,"J. ACM, vol. 1, no. 1, pp. 47-85, 1984.
[31] Y. Tanaka, "MPDC: Massive parallel architecure for very large databases," inProc. Int. Conf. on Fifth Generation Computer Systems, Tokyo, 1984.
[32] G. Hulin, "Parallel processing of recursive queries in distributed architectures," inProc. Int. Conf. on Very Large Databases (VLDB), Amsterdam, Aug. 1989, pp. 87-96.
[33] M. Houtsma, P. Apers, and S. Ceri, "Parallel computation of transitive closure queries on fragmented databases," Memo. INF-88-56, Univ. of Twente, 1988.
[34] M. A. W. Houtsma, P. M. G. Apers, and S. Ceri, "Distributed transitive closure computations: The disconnection set approach," inProc. Sixteenth Int. Con. on Very Large Data Bases, Brisbane, Australia, Aug. 13-16, 1990, pp. 335-346.
[35] J.-P. Cheiney and C. de Maindreville, "A parallel strategy for transitive closure using double hash-based clustering," inProc. Int. Conf. on Very Large Databases (VLDB), Brisbane, 1990, pp. 347-358.
[36] Y.-N. Huang and J.-P. Cheiney, "Parallel computation of direct transitive closures," inProc. Int. IEEE Conf. on Data Engineering, Kobe, Apr. 1991, pp. 192-199.
[37] F. Afrati and C. H. Papadimitriou, "The parallel complexity of simple chain queries," inProc. ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems, 1987, pp. 210-213.
[38] S. S. Cosmodakis and P. C. Kanellakis, "Parallel evaluation of recursive rule queries," inProc. ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems, 1986, pp. 280-293.
[39] S. Ganguly, A. Silberschatz, and S. Tsur, "A framework for the parallel processing of datalog queries," inProc. ACM-Sigmod Int. Conf. on Management of Data, 1990.
[40] S. R. Cohen and O. Wolfson, "Why a single parallelization strategy is not enough in knowledge bases," inProc. ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems, Philadelphia, Mar. 1989, pp. 200-216.
[41] O. Wolfson and A. Ozeri, "A new paradigm for parallel and distributed rule processing," inProc. of the ACM-Sigmod Int. Conf. on Management of Data, 1990.
[42] E. Y. Shapiro, Ed.,Concurrent Prolog--Collected Papers. Cambridge, MA: The MIT Press, 1987.

Index Terms:
recursive queries evaluation; distributed databases; logic queries; optimization strategies; selection conditions; clustering; program transformation; semijoins; set-oriented computation; distributed network; dataflow-oriented evaluation; distributed databases; query processing
W. Nejdl, S. Ceri, G. Wiederhold, "Evaluating Recursive Queries in Distributed Databases," IEEE Transactions on Knowledge and Data Engineering, vol. 5, no. 1, pp. 104-121, Feb. 1993, doi:10.1109/69.204095
Usage of this product signifies your acceptance of the Terms of Use.