This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Binding Propagation Techniques for the Optimization of Bound Disjunctive Queries
March/April 2003 (vol. 15 no. 2)
pp. 368-385
Sergio Greco, IEEE Computer Society

Abstract—This paper presents a technique for the optimization of bound queries on disjunctive deductive databases. The optimization is based on the rewriting of the source program into an equivalent program which can be evaluated more efficiently. The proposed optimization reduces the amount of data needed to answer the query and, consequently, 1) reduces the complexity of computing a single model and, more importantly, 2) greatly reduces the number of models to be considered. Although, in this paper, we consider the application of the magic-set method, other rewriting techniques defined for special classes of queries can also be applied. To show the relevance of our technique, we have implemented a prototype of an optimizer. Several experiments have confirmed the value of the technique.

[1] S. Abiteboul, R. Hull, and V. Vianu, Foundations of Databases. Addison-Wesley, 1995.
[2] I. Balbin, G.S. Port, K. Ramamohanarao, and K. Meenakshi, “Efficient Bottom-UP Computation of Queries on Stratified Databases,” J. Logic Programming, vol. 11, nos. 3 and 4, pp. 295-344, 1991.
[3] F. Bancilhon, D. Maier, Y. Sagiv, and J.D. Ullman, "Magic Sets and Other Strange Ways to Implement Logic Programs," Proc. Fifth ACM PODS Symp. Principles of Database Systems, pp. 1-15, 1986.
[4] C. Beeri and R. Ramakrisnhan, “On the Power of Magic,” J. Logic Programming, vol. 11, nos. 3 and 4, pp. 255-299, 1991.
[5] R. Manthey and F. Bry, “SATCHMO: A Theorem Prover Implemented in Prolog,” Proc. Int'l Conf. Automated Deduction, pp. 415-434, 1988.
[6] M. Cadoli, T. Eiter, and G. Gottlob, “Default Logic as a Query Language,” IEEE Trans. Knowledge and Data Eng., vol. 9, no. 3, pp. 448-463, May/June 1997.
[7] S. Brass and J. Dix, “A General Approach to Bottom-Up Computation of Disjunctive Semantics,” Proc. Nonmonotonic Extensions of Logic Programming (ICLP '94) Workshop, pp. 127-155, 1994.
[8] J. Dix and M. Mueller, “Partial Evaluation and Relevance for Approximations of Stable Semantics,” Proc. Eighth Int'l Symp. Methodologies for Intelligent Systems, pp. 511-520, 1994.
[9] T. Eiter, G. Gottlob, and H. Mannila, “Disjunctive Datalog,” ACM Trans. Database Systems, vol. 22, no. 3, pp. 364-418, 1997.
[10] T. Eiter, N. Leone, C. Mateis, G. Pfeifer, and F. Scarcello, “A Deductive System for Non-Monotonic Reasoning,” Proc. Int'l Conf. Logic Programming and Nonmonotonic Reasoning, pp. 363-374, 1997.
[11] J.A. Fernández and J. Minker, “Semantics of Disjunctive Deductive Databases,” Proc. Fourth Int'l Conf. Database Theory, pp. 21-50, 1992.
[12] J.A. Fernández and J. Minker, “Theory and Algorithms for Disjunctive Deductive Databases,” J. Logic Programming, vol. 25, no. 1, pp. 33-51, 1995.
[13] M. Gelfond and V. Lifschitz, “The Stable Model Semantics for Logic Programming,” Proc. Fifth Int'l Conf. and Symp. Logic Progrramming, pp. 1070-1080, Aug. 1988.
[14] M. Gelfond and V. Lifschitz, “Classical Negation in Logic Programs and Disjunctive Databases,” New Generation Computing, vol. 9, pp. 365-385, 1991.
[15] J. Grant and J. Minker, “Answering Queries in Indefinite Databases and the Null Value Problem,” Adavances in Computing Research, vol. 3, pp. 247-267, 1986.
[16] S. Greco, “Binding Propagation into Disjunctive Databases,” Proc. 24rd Int'l Conf. Very Large Data Bases, pp. 287-298, Aug. 1998.
[17] S. Greco, “Optimization of Disjunctive Queries,” Proc. Int'l Conf. Logic Programming, pp. 441-455, 1999.
[18] S. Greco, “Minimal Founded Semantics for Disjunctive Logic Programming,” Proc. Fifth Int'l Conf. Logic Programming and Nonmonotonic Reasoning, pp. 221-235, 1999.
[19] S. Greco, N. Leone, and F. Scarcello, “Disjunctive Datalog with Nested Rules,” Proc. Third Int'l Workshop Logic Programming and Knowledge Rapresentation, pp. 52-65, 1997.
[20] S. Greco, D. Saccà, and C. Zaniolo, “The PushDown Method to Optimize Chain Logic Programs,” Proc. 22nd Int'l Colloquium Automata Languages and Programming, pp. 523-534, 1995.
[21] S. Greco and E. Zumpano, “Querying Inconsistent Databases,” Proc. Seventh Int'l Conf. Logic for Programming and Automated Reasoning, 2000.
[22] F. Jarre, R. Lepenis, and D. Seipel, “Using Linear and Semi-Definite Programming for Computing Models of Disjunctive Deductive Databases,” Proc. 13th Workshop Logic Programming, 1998.
[23] R. Hasegawa, K. Inoue, Y. Ohta, and M. Koshimura, “Non-Horn Magic Sets to Incorporate Top-Down Inference into Bottom-Up Theorem Proving,” Proc. Int'l Conf. Automated Deduction, pp. 176-190, 1997.
[24] L. Lakshmanan and F. Sadri, “Probabilistic Deductive Databases,” Proc. Int'l Logic Programming Symp., pp. 254-268, 1994.
[25] K.C. Liu and R. Sunderraman,“Indefinite and maybe information in relational databases,” ACM Trans. Database Systems, vol. 15, no. 1, pp. 1-39, 1990.
[26] D.W. Loveland, “Near-Horn PROLOG,” Proc. Fourth Int'l Conf. Logic Programming, pp. 456-469, 1987.
[27] J. Lobo, J. Minker, and A. Rajasekar, Foundations of Disjunctive Logic Programming. Cambridge, Mass.: MIT Press, 1992.
[28] D.W. Loveland, D.W. Reed, and D.S. Wilson, “SATCHMORE: SATCHMO with RElevancy,” J. Automated Reasoning, vol. 14, no. 2, pp. 325-351, 1995.
[29] J. Minker,“On indefinite databases and the closed world assumption,” Proc. Automated Deduction Conf., pp. 292-308, 1982.
[30] J. Minker and A. Rajasekar, “A Fixpoint Semantics for Disjunctive Logic Programming,” J. Logic Programming, vol. 9, no. 1, pp. 45-74, 1990.
[31] G. Nadathur and D.W. Loveland, “Uniform Proofs and Disjunctive Logic Programming,” Proc. 10th Int'l Conf. Logic in Computer Science, pp. 148-155, 1995.
[32] J. Naughton, R. Ramakrisnhan, Y. Sagiv, and J.F. Ullman, “Efficient Evaluation of Right-, Left-, and Multi-Linear Rules,” Proc. ACM SIGMOD Int'l Conf. Management of Data, pp. 235-242, 1989.
[33] T.C. Przymusinski, "On the Declarative Semantics of Deductive Databases and Logic Programs," J. Minker, ed., Foundations of Deductive Databases and Logic Programming, pp. 193-216. Morgan Kaufmann, 1988.
[34] T. Przymusinski, “Stable Semantics for Disjunctive Programs,” New Generation Computing, vol. 9, pp. 401-424, 1991.
[35] T. Przymusinski, “Static Semantics for Normal and Disjunctive Logic Programs,” Annals of Math. and Artificial Intelligence, vol. 14, pp. 323-357, 1995.
[36] R. Ramakrisnhan, R. Sagiv, J.D. Ullman, and M.Y. Vardi, “Logical Query Optimization by Proof-Tree Transformation,” J. Computer and System Science, vol. 47, pp. 222-248, 1993.
[37] D.W. Reed, D.W. Loveland, and B.T. Smith, “The Near-Horn Approach to Disjunctive Logic Programming,” Proc. Second Int'l Workshop Extensions of Logic Programming, pp. 345-369, 1991.
[38] K. Ross, “Well-Founded Semantics for Disjunctive Logic Programs,” Proc. First Int'l Conf. Deductive and Objected-Oriented Databaes, pp. 385-402, 1989.
[39] K.A. Ross, “Modular Stratification and Magic Sets for Datalog Programs with Negation,” J. ACM, vol. 41, no. 6, pp. 1216-1266, 1994.
[40] C. Ruiz and J. Minker, “Computing Stable and Partial Stable Models of Extended Disjunctive Logic Programs,” Proc. Non-Monotonic Extensions of Logic Programming (NMELP'94), ICLP '94 Workshop, pp. 205-229, 1994.
[41] D. Seipel and H. Argenton, “A Data Structure for Efficient Deduction in Disjunctive Logic Programs,” Proc. Workshop Logische Programmierung, pp. 90-94, 1993.
[42] D. Seipel, J. Minker, and C. Ruiz, “A Characterization of the Partial Stable Models For Disjunctive Databases,” Proc. Fourth Int'l Symp. Logic Programming, pp. 245-259, 1997.
[43] Y. Shimajiri, H. Seki, and H. Itoh, “Making Query Processing Goal-Directed in Disjunctive Logic Databases,” Proc. Int'l Conf. Logic Programming, pp. 376-390, 1997.
[44] B.T. Smith and D.W. Loveland, “A Simple Near-Horn Prolog Interpreter,” Proc. Fifth Int'l Conf. and Symp. Logic Programming, pp. 794-809, 1988.
[45] J. Ullman, Principles of Database and Knowledge-Base Systems, vol. 1. Computer Science Press, 1988.
[46] A.H. Yahya, “Generalized Query Answering in Disjunctive Deductive Databases: Procedural and Non-Monotonic Aspects,” Proc. Int'l Logic Programming and Nonmonotonic Reasoning, pp. 325-341, 1997.
[47] A. Yahya and L. Henschen, “Deduction in Non-Horn Databases,” J. Automated Reasoning, vol. 1, no. 2, pp. 141-160, 1985.
[48] L.Y. Yuan and D.A. Chiang, “A Sound and Complete Query Evaluation Algorithm for Relational Databases with Disjunctive Information,” Proc. Eight Symp. Principles of Database Systems, pp. 66-74, 1989.
[49] C. Zaniolo, “Database Relations with Null Values,” J. Computer and System Science, vol. 28, no. 1, pp. 142-166, 1984.

Index Terms:
Disjunctive databases, optimization, query rewriting.
Citation:
Sergio Greco, "Binding Propagation Techniques for the Optimization of Bound Disjunctive Queries," IEEE Transactions on Knowledge and Data Engineering, vol. 15, no. 2, pp. 368-385, March-April 2003, doi:10.1109/TKDE.2003.1185840
Usage of this product signifies your acceptance of the Terms of Use.