This Article 
 Bibliographic References 
 Add to: 
Programming with Logical Queries, Bulk Updates, and Hypothetical Reasoning
July-August 1997 (vol. 9 no. 4)
pp. 587-599

Abstract—This paper presents a language of update programs that integrates logical queries, bulk updates and hypothetical reasoning in a seamless manner. There is no syntactic or semantic distinction between queries and updates. Update programs extend logic programs with negation in both syntax and semantics. They allow bulk updates in which an arbitrary update is applied simultaneously for all answers of an arbitrary query. Hypothetical reasoning is naturally supported by testing the success or failure of an update. We describe an alternating fixpoint semantics of update programs and show that it can express all nondeterministic database transformations.

[1] S. Abiteboul, "Updates: A New Frontier," Proc. Int'l Conf. Database Theory, 1988.
[2] S. Abiteboul and V. Vianu, "Non-Determinism in Logic-Based Languages," Annals Math. and Artificial Intelligence, vol. 3, pp. 151-186, 1991.
[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] S. Abiteboul and V. Vianu, "Procedural Languages for Database Queries and Updates, J. Computer and System Sciences, vol. 41, no. 2, pp. 181-229, Oct. 1990.
[5] K. Apt, H.A. Blair, and A. Walker, "Towards a Theory of Declarative Knowledge," Foundations of Deductive Databases and Logic Programming, J. Minker, ed., pp. 89-148. Morgan Kaufmann, 1988.
[6] K.R. Apt and M.H. van Emden, "Contributions to the Theory of Logic Programming," J. ACM, vol. 29, no. 3, pp. 841-862, July 1982.
[7] E. Bertino, M. Martelli, and D. Montesi, "Modeling Database Updates with Constraint Logic Programming," Proc. Deductive Database Workshop at Joint Int'l Conf. and Symp. Logic Programming, 1992.
[8] A.J. Bonner, "Hypothetical Datalog: Complexity and Expressibility," Theoretical Computer Science, vol. 76, pp. 3-51, 1990.
[9] A.J. Bonner and M. Kifer, "Transaction Logic Programming," Proc. Int'l Conf. Logic Programming, June 1993.
[10] F. Bry, "Intensional Updates: Abduction via Deduction," Proc. Int'l Conf. Logic Programming, 1990.
[11] W. Chen, "Declarative Updates of Relational Databases," ACM Trans. Database Systems, vol. 20, no. 1, pp. 42-70, Mar. 1995.
[12] W. Chen, "Query Evaluation of Alternating Fixpoint Logic," ACM Trans. Database Systems, vol. 20, no. 3, pp. 239-287, 1995.
[13] W. Chen, "Declarative Specification and Evaluation of Database Updates," Proc. Int'l Conf. Deductive and Object-Oriented Databases, Dec. 1991.
[14] W. Chen and D.S. Warren, "Query Evaluation Under the Well Founded Semantics," The 12th ACM Symp Principles of Database Systems, 1993.
[15] W.F. Clocksin and C.S. Mellish,Programming in Prolog, 2nd ed. New York: Springer-Verlag, 1984.
[16] D.M. Gabbay and U. Reyle, "N-Prolog: An Extension of Prolog with Hypothetical Implications," J. Logic Programming, vol. 4, no. 1, pp. 319-355, 1984.
[17] S. Ghandeharizadeh, R. Hull, D. Jacobs, J. Castillo, M. Escobar-Molano, S.-H. Lu, C. Tsang, and G. Zhou, "On Implementing a Language for Specifying Active Database Execution Models," Proc. Int'l Conf. Very Large Data Bases, 1993.
[18] D. Harel, First-Order Dynamic Logic. Lecture Notes in Computer Science, vol. 68. Springer-Verlag, 1979.
[19] R. Hull and D. Jacobs, "Language Constructs for Programming Active Databases," Proc. Int'l Conf. Very Large Data Bases, pp. 455-467, Sept. 1991.
[20] D. Jacobs and R. Hull, "Database Programming with Delayed Updates," Proc. Int'l Workshop Database Programming Languages, pp. 416-428. Morgan-Kaufmann, 1991.
[21] A.C. Kakas and P. Mancarella, "Database Updates through Abduction," Proc. Int'l Conf. Very Large Data Bases, pp. 650-661, 1990.
[22] H. Katsuno and A.O. Mendelzon, "On the Difference between Updating a Knowledge Base and Revising It," J.A. Allen, R. Fikes, and E. Sandewell, eds., Proc. Second Int'l Conf. Principles of Knowledge Representation and Reasoning, 1991.
[23] H.F. Korth and A. Silberschatz, Database System Concepts. McGraw-Hill, second edition, 1991.
[24] Modeling Database Dynamics, U.W. Lipeck, and B. Thalheim, eds., Volkse1992. Springer-Verlag, 1993.
[25] S. Manchanda and D.S. Warren, "A Logic-Based Language for Database Updates," J. Minker, ed., Foundations of Logic Programming and Deductive Databases.Los Altos, Calif.: Morgan Kaufmann, 1988.
[26] S. Naqvi and R. Krishnamurthy, "Database Updates in Logic Programming," Proc. ACM Symp. Principles of Database Systems, pp. 251-262, 1988.
[27] 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.
[28] T.C. Przymusinski, "On the Declarative and Procedural Semantics of Logic Programs," J. Automated Reasoning, vol. 5, pp. 167-205, 1989.
[29] R. Ramakrishnan and J.D. Ullman, "A Survey of Research on Deductive Database Systems," J. Logic Programming, vol. 23, no. 2, pp. 125-149, 1995.
[30] P.A. Spruit, R.J. Wieringa, and J.-J.C. Meyer, "Dynamic Database Logic: The First-Order Case," Lipeck, W. Udo and Thalheim, Bernhard, eds., Modeling Database Dynamics, pp. 103-120. Springer Verlag, 1992.
[31] E. Teniente and A. Olivé, "The Events Method for View Updating in Deductive Databases," Proc. Int'l Conf. Extending Database Technology, pp. 245-260. Springer-Verlag, 1992.
[32] A. Van Gelder, "The Alternating Fixpoint of Logic Programs with Negation," J. Computer and System Sciences, vol. 47, pp. 185-221, 1993.
[33] 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.
[34] D.S. Warren, "Database Updates in Pure Prolog," Proc. FGCS, pp. 244-253, 1984.
[35] M. Winslett, Updating Logical Databases. Cambridge Univ. Press, 1990.

Index Terms:
Bulk updates, hypothetical reasoning, logical queries, alternating fixpoint semantics, database languages.
Weidong Chen, "Programming with Logical Queries, Bulk Updates, and Hypothetical Reasoning," IEEE Transactions on Knowledge and Data Engineering, vol. 9, no. 4, pp. 587-599, July-Aug. 1997, doi:10.1109/69.617052
Usage of this product signifies your acceptance of the Terms of Use.