This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Dynamic Programming in Datalog with Aggregates
March/April 1999 (vol. 11 no. 2)
pp. 265-283

Abstract—Dynamic programming is a general technique for solving optimization problems. It is based on the division of problems into simpler subproblems that can be computed separately. In this paper, we show that Datalog with aggregates and other nonmonotonic constructs can express classical dynamic programming optimization problems in a natural fashion, and then we discuss the important classes of queries and applications that benefit from these techniques.

[1] S. Abiteboul,E. Simon,, and V. Vianu,“Non-deterministic languages to express deterministictransformations,” Proc. Ninth ACM Symp. Principles of Database Systems, pp. 218-229, Apr. 1990.
[2] S. Abiteboul, R. Hull, and V. Vianu, Foundations of Databases. Addison-Wesley, 1995.
[3] S. Abiteboul and V. Vianu, "Datalog Extensions for Database Queries and Updates," J. Computer and System Sciences, vol. 43, no. 1, pp. 62-124, Aug. 1991.
[4] A.V. Aho,J.E. Hopcroft, and J.D. Ullman,The Design and Analysis of Computer Algorithms.Reading, Mass.: Addison-Wesley, 1974.
[5] R.E. Bellman Dynamic Programming. Princeton, N.J.: Princeton Univ. Press, 1957.
[6] A. Chandra and D. Harel, "Structure and Complexity of Relational Queries," J. Computer and System Sciences, vol. 25, no. 1, pp. 99-128, 1982.
[7] M.P. Consens and A.O. Mendelzon, "Low Complexity Aggregation in Graphlog and Datalog," Proc. Third Int'l Conf. Database Theory, pp. 379-394, 1990.
[8] S.W. Dietrich, "Shortest Path by Approximation in Logic Programs," ACM Letters Programming Languages and Systems, vol. 1, no. 2, pp. 119-137, June 1992.
[9] M. Gelfond and V. Lifschitz, "The Stable Model Semantics of Logic Programming," Proc. Fifth Int'l Conf. Logic Programming, pp. 1,070-1,080, 1988.
[10] F. Giannotti, D. Pedreschi, D. Saccà, and C. Zaniolo, "Nondeterminism in Deductive Databases," Proc. Second Int'l Conf. Deductive and Object-Oriented Databases, pp. 129-146, 1991.
[11] S. Ganguly, S. Greco, and C. Zaniolo, "Minimum and Maximum Predicates in Logic Programming," Proc. 10th ACM PODS Symp. Principles of Database Systems, pp. 154-163, 1991.
[12] S. Ganguly, S. Greco, and C. Zaniolo, "Extrema Predicates in Deductive Databases," J. Computer and System Science, no. 51, pp. 244-259, 1995.
[13] S. Greco, C. Zaniolo, and S. Ganguly, "Optimization of Logic Queries with MIN and MAX Predicates," Proc. Int'l Conf. Flexible Query Answering, 1998.
[14] S. Greco, C. Zaniolo, and S. Ganguly, "Greedy by Choice," Proc. 11th ACM PODS Symp. Principles of Database Systems, pp. 105-113, 1992.
[15] S. Greco, D. Saccà, and C. Zaniolo, "Dynamic Programming Optimization for Logic Queries with Aggregates," Proc. Int'l Logic Programming Symp., pp. 574-589, 1992.
[16] S. Greco, D. Saccà, and C. Zaniolo, "Datalog with Stratified Negation and Choice: from P to DP," Proc. Int'l Conf. Database Theory, pp. 574-589, 1995.
[17] J. Jaffar and J.L. Lassez, "Constraint Logic Programming," Proc. ACM Principles of Programming Languages, pp. 111-119, 1987.
[18] J. Jaffar and M.J. Maher, "Constraint Logic Programming: A Survey," J. Logic Programming, vols. 19/20, pp. 503-581, May/June 1994.
[19] P.C. Kanellakis, G.M. Kuper, and P.Z. Revesz, Constraint Query Languages J. Computer and System Sciences, vol. 51, no. 1, pp. 26-52, 1995.
[20] D.B. Kemp and P.J. Stuckey, "Semantics of Logic Programs with Aggregates," Proc. Int'l Logic Programming Symp., pp. 338-401, 1991.
[21] R. Krishnamurthy and S. Naqvi, "Non-Deterministic Choice in Datalog," Proc. Third Int'l Conf. Data and Knowledge Bases, pp. 416-424, 1988.
[22] J.W. Lloyd, Foundations of Logic Programming, Springer Series in Symbolic Computation, second ed. New York: Springer-Verlag, 1987.
[23] W. Marek and M. Truszczynski, "Autoepistemic Logic," J. ACM, vol. 38, no. 3, pp. 588-619, 1991.
[24] I.S. Mumick, H. Pirahesh, and R. Ramakrishnan, “The Magic of Duplicates and Aggregates,” Proc. Very Large Data Base Conf., pp. 264–277, 1990.
[25] I.S. Mumick and O. Shmueli, "How Expressive is Stratified Aggregation," Annuals Math. and Artificial Intelligence, vol. 15, nos. III-IV, 1995.
[26] S. Naqvi and S. Tsur, A Logical Language for Data and Knowledge Bases.New York: Computer Science Press, 1989.
[27] C. Papadimitriou, "A Note on the Expressive Power of Prolog," Bull. EATCS, vol. 26, pp. 21-23, 1985.
[28] 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.
[29] R. Ramakrishnan,D. Srivastava,, and S. Sudarshan,“Coral_Control, relations and logic,” Proc. 18th Int’l Conf. Very Large Data Bases, pp. 547-559.,Vancouver, Can., Aug. 1992.
[30] K.A. Ross and Y. Sagiv, "Monotonic Aggregation in Deductive Databases," Proc. 11th ACM PODS Symp. Principles of Database Systems, 1992; also Proc. Workshop Deductive Databases Int'l Symp. Logic Programming, pp. 53-61, Oct. 1991.
[31] D. Saccà and C. Zaniolo, "Stable Models and Non-determinism for Logic Programs with Negation," ACM SIGACT-SIGMOD-SIGART Symp. Principles of Database Systems, pp. 205-217, 1990.
[32] D. Saccà, "The Expressive Powers of Stable Models for Bound and Unbound DATALOG Queries," J. Computer and System Sciences, 1995.
[33] J.S. Schlipf, "The Expressive Powers of the Logic Programming Semantics (extended abstract)," ACM SIGACT-SIGMOD-SIGART Symp. Principles of Database Systems, pp. 196-204, 1990.
[34] D. Srivastava and R. Ramakrisnhan, "Pushing Constraints Selection," J. Logic Programming, no. 16, pp. 361-414, 1993.
[35] S. Sudarshan and R. Ramakrishnan, "Aggregation and Relevance in Deductive Databases," Proc. Int'l Conf. Very Large Databases, 1991.
[36] S. Sudarshan, D. Srivastava, R. Ramakrishnan, and C. Beeri, Extending the Well-Founded and Valid Model Semantics for Aggregation Proc. Int'l Logic Programming Symp., 1993.
[37] J. Ullman, Principles of Database and Knowledge-Base Systems, vol. 1. Computer Science Press, 1988.
[38] A. van Gelder,K. Ross, and J.S. Schlipf,"The well-founded semantics for general logic programs," J. ACM, vol. 38, no. 3, pp. 620-650, July 1991.
[39] A. Van Gelder, The Well-Founded Semantics of Aggregation Proc. ACM Symp. Principles of Database Systems, pp. 127-138, June 1992.
[40] A. Van Gelder, "Foundations of Aggregations in Deductive Databases," Proc. Int'l Conf. Deductive and Object-Oriented Databases, 1993.
[41] M.Y. Vardi, "The Complexity of Relational Query Languages," Proc. ACM Symp. Theory of Computing, pp. 137-146, 1982.

Index Terms:
Deductive databases, nonmonotonic reasoning, aggregates, optimization.
Citation:
Sergio Greco, "Dynamic Programming in Datalog with Aggregates," IEEE Transactions on Knowledge and Data Engineering, vol. 11, no. 2, pp. 265-283, March-April 1999, doi:10.1109/69.761663
Usage of this product signifies your acceptance of the Terms of Use.