Abstract
This paper investigates efficient evaluation of database updates and presents a procedural semantics for stratified update programs that extend stratified logic programs with bulk updates and hypothetical reasoning. Bulk rules with universal quantification in the body allow an arbitrary update to be applied simultaneously for every answer of an arbitrary query. Hypothetical reasoning is supported by testing the success or failure of an update. The procedural semantics offers efficient goal-oriented tabled evaluation of database updates. It guarantees termination for function-free stratified update programs and avoids repeated computation of identical subgoals.
Similar content being viewed by others
References
S. Abiteboul, Updates: A new frontier, in: Intl. Conference on Database Theory (1988).
S. Abiteboul and V. Vianu, Equivalence and optimization of relational transactions, Journal of ACM 35(1) (1988) 70–120.
S. Abiteboul and V. Vianu, Non-determinism in logic-based languages, Annals of Math. and AI 3 (1991) 151–186.
S. Abiteboul and V. Vianu, Datalog extensions for database queries and updates, Journal of Computer and System Sciences 43(1) (1991) 62–124.
S. Abiteboul and V. Vianu, Procedural languages for database queries and updates, Journal of Computer and System Sciences 41(2) (1990) 181–229.
A. Aiken, J. Widom and J.M. Hellerstein, Behavior of database production rules: Termination, confluence, and observable determinism, in: ACM SIGMOD Conference on Management of Data (1992) pp. 59–68.
K.R. Apt and M.H. Van Emden, Contributions to the theory of logic programming, Journal of ACM 29(3) (1982) 841–862.
E. Bertino, M. Martelli and D. Montesi, Modeling database updates with constraint logic programming, in: Proceedings of the Deductive Database Workshop at Joint International Conference and Symposium on Logic Programming (1992).
R. Bol and L. Degerstedt, Tabulated resolution for well founded semantics, in: Int. Logic Programming Symposium (October 1993).
A.J. Bonner, Hypothetical datalog: Complexity and expressibility, Theoretical Computer Science 76 (1990) 3–51.
A.J. Bonner and M. Kifer, Transaction logic programming, Technical Report CSRI-270, Computer Systems Research Institute, University of Toronto (April 1992).
A.J. Bonner and M. Kifer, Transaction logic programming, in: Int. Conference on Logic Programming (June 1993).
W. Chen, Declarative updates of relational databases, ACM Transactions on Database Systems, 20(1) (1995) 42–70.
W. Chen, Query evaluation in deductive databases with alternating fixpoint semantics, ACM Transactions on Database Systems (September 1995) 239–287.
W. Chen, Programming with logical queries, bulk updates and hypothetical reasoning, IEEE Transactions on Knowledge and Data Engineering (1996), accepted.
W. Chen and D.S. Warren, Tabled evaluation with delaying for general logic programs, Journal of ACM 43(1) (1996) 20–74.
C.C. Cosmadakis and C.H. Papadimitriou, Updates of relational views, Journal of ACM 31(4) (1984) 742–760.
C. Fan and S.W. Dietrich, Extension table built-ins for Prolog, Software — Practice and Experience 22(7) (1992) 573–597.
G. Gottlob, P. Paolini and R. Zicari, Properties and update semantics of relational views, ACM Transactions on Database Systems 13(4) (1988).
R. Hull and D. Jacobs, Language constructs for programming active databases, in: Int. Conference on Very Large Data Bases (September 1991) pp. 455–467.
D. Jacobs and R. Hull, Database programming with delayed updates, in: Int. Workshop on Database Programming Languages (Morgan Kaufmann, 1991) pp. 416–428.
D. Karabeg and V. Vianu, Parallel update transactions, Theoretical Computer Science 76 (1990) 93–114.
D. Karabeg and V. Vianu, Simplification rules and complete axiomatization for relational update transactions, ACM Transactions on Database Systems 16(3) (1991) 439–475.
M. Kifer, G. Lausen and J. Wu, Logical foundations of object-oriented and frame-based languages, Journal of ACM 42(4) (1995).
H.F. Korth and A. Silberschatz, Database System Concepts, (McGraw-Hill, 1991).
U.W. Lipeck and B. Thalheim, eds., Modeling Database Dynamics, Volkse 1992 (Springer-Verlag, 1993).
J.W. Lloyd, Foundations of Logic Programming, 2nd ed. (Springer-Verlag, New York, 1987).
S. Manchanda and D.S. Warren, A logic-based language for database updates, in: Foundations of Logic Programming and Deductive Databases ed. J. Minker (Morgan Kaufmann, Los Altos, CA, 1988).
W. Marek and M. Truszczynski, Revision specifications by means of revision programs, in: Logics in AI. Proceedings of JELIA'94, Lecture Notes in Artificial Intelligence (Springer-Verlag, 1994).
W. Marek and M. Truszczynski, Revision programming, database updates and integrity constraints, in: Int. Conference on Database Theory (Springer-Verlag, 1995) pp. 368–382.
S. Naqvi and R. Krishnamurthy, Database updates in logic programming, in: Proceedings of ACM Symposium on Principles of Database Systems (1988) pp. 251–262.
T.C. Przymusinski, On the declarative semantics of deductive databases and logic programs, in: Foundations of Deductive Databases and Logic Programming, ed. J. Minker (Morgan Kaufmann, Los Altos, CA, 1988) pp. 193–216.
T.C. Przymusinski, On the declarative and procedural semantics of logic programs, Journal of Automated Reasoning 5 (1989) 167–205.
T.C. Przymusinski and H. Turner, Update by means of inference rules, in: Proceedings of the Third International Conference on Logic Programming and Nonmonotonic Reasoning, Lecture Notes in Artificial Intelligence (Springer, 1995) pp. 156–174.
P.A. Spruit, R.J. Wieringa and J.-J.Ch. Meyer, Dynamic database logic: The first-order case, in: Modeling Database Dynamics, eds. U.W. Lipeck and B. Thalheim (Springer-Verlag, 1992) pp. 103–120.
H. Tamaki and T. Sato, OLD resolution with tabulation, in: Int. Conference on Logic Programming (MIT Press, 1986) pp. 84–98.
A. Van Gelder, The alternating fixpoint of logic programs with negation, Journal of Computer and System Sciences 47 (1993) 185–221.
A. Van Gelder, K.A. Ross and J.S. Schlipf, The well-founded semantics for general logic programs, Journal of ACM 38(3) (1991) 620–650.
A. Van Gelder and R.W. Topor, Safety and translation of relational calculus queries, ACM Transactions on Database Systems 16(2) (1991) 235–278.
L. Vieille, Recursive query processing: The power of logic, Theoretical Computer Science 69 (1989) 1–53.
M. Winslett, Updating Logical Databases (Cambridge University Press, 1990).
J. Zeng and W. Chen, Declarative production rules in active databases, Technical Report 94-CSE-15, Department of Computer Science and Engineering, Southern Methodist University (1994).
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Chen, W., Liu, J.YC. A procedural semantics for stratified database updates. Annals of Mathematics and Artificial Intelligence 21, 187–220 (1997). https://doi.org/10.1023/A:1018965418898
Issue Date:
DOI: https://doi.org/10.1023/A:1018965418898