Efficient Integrity Checking for Databases with Recursive Views

  • Davide Martinenghi
  • Henning Christiansen
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3631)


Efficient and incremental maintenance of integrity constraints involving recursive views is a difficult issue that has received some attention in the past years, but for which no widely accepted solution exists yet. In this paper a technique is proposed for compiling such integrity constraints into incremental and optimized tests specialized for given update patterns. These tests may involve the introduction of new views, but for relevant cases of recursion, simplified integrity constraints are obtained that can be checked more efficiently than the original ones and without auxiliary views. Notably, these simplified tests are derived at design time and can be executed before the particular database update is made and without simulating the updated state. In this way all overhead due to optimization or execution of compensative actions at run time is avoided. It is argued that, in the recursive case, earlier approaches have not achieved comparable optimization with the same level of generality.


Transitive Closure Integrity Constraint Deductive Database Integrity Check Recursive Rule 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Apt, K.R., Blair, H.A., Walker, A.: Towards a theory of declarative knowledge. In: Foundations of Deductive Databases and Logic Programming, pp. 89–148. Morgan Kaufmann, San Francisco (1988)Google Scholar
  2. 2.
    Behrend, A.: Soft stratification for magic set based query evaluation in deductive databases. In: Proceedings of the twenty-second ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems, pp. 102–110. ACM Press, New York (2003)CrossRefGoogle Scholar
  3. 3.
    Behrend, A.: Soft Stratification for Transformation-Based Approaches to Deductive Databases. PhD thesis, University of Bonn (2004)Google Scholar
  4. 4.
    Catarci, T., Cruz, I.F.: On expressing stratified datalog. In: 2nd ICLP Workshop on Deductive Databases and Logic Programming, pp. 85–100 (1994)Google Scholar
  5. 5.
    Chakravarthy, U.S., Grant, J., Minker, J.: Logic-based approach to semantic query optimization. ACM Transactions on Database Systems (TODS) 15(2), 162–207 (1990)CrossRefGoogle Scholar
  6. 6.
    Christiansen, H., Martinenghi, D.: Simplification of database integrity constraints revisited: A transformational approach. In: Bruynooghe, M. (ed.) LOPSTR 2004. LNCS, vol. 3018, pp. 178–197. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  7. 7.
    Decker, H.: Translating advanced integrity checking technology to sql. In: Database integrity: challenges and solutions, pp. 203–249. Idea Group Publishing, USA (2002)Google Scholar
  8. 8.
    Dong, G., Su, J.: Incremental Maintenance of Recursive Views Using Relational Calculus/SQL. SIGMOD Record 29(1), 44–51 (2000)CrossRefGoogle Scholar
  9. 9.
    Eisinger, N., Ohlbach, H.J.: Deduction systems based on resolution. In: Handbook of Logic in Artificial Intelligence and Logic Programming. Logical Foundations, vol. 1, pp. 183–271. Clarendon Press, Oxford (1993)Google Scholar
  10. 10.
    Godfrey, P., Grant, J., Gryz, J., Minker, J.: Integrity constraints: Semantics and applications. Logics for Databases and Information Systems, 265–306 (1998)Google Scholar
  11. 11.
    Grant, J., Minker, J.: Integrity constraints in knowledge based systems. In: Knowledge Engineering. Applications, vol. II, pp. 1–25. McGraw-Hill, New York (1990)Google Scholar
  12. 12.
    Gupta, A., Mumick, I.S. (eds.): Materialized views: techniques, implementations, and applications. MIT Press, Cambridge (1999)Google Scholar
  13. 13.
    INCITS. Information technology - Database languages - SQL - Part 2: Foundation (SQL/Foundation) - INCITS/ISO/IEC 9075-2-1999 (1999)Google Scholar
  14. 14.
    Ioannidis, Y.E., Wong, E.: Towards an algebraic theory of recursion. J. ACM 38(2), 329–381 (1991)zbMATHCrossRefMathSciNetGoogle Scholar
  15. 15.
    Kapur, D., Narendran, P.: Np-completeness of the set unification and matching problems. In: CADE, pp. 489–495 (1986)Google Scholar
  16. 16.
    Knuth, D., Bendix, P.: Simple word problems in universal algebras. Computational Problems in Abstract Algebras, 263–297 (1970)Google Scholar
  17. 17.
    Lee, S.Y., Ling, T.W.: Further improvements on integrity constraint checking for stratifiable deductive databases. In: VLDB 1996, Proceedings of 22th International Conference on Very Large Data Bases, pp. 495–505. Morgan Kaufmann, San Francisco (1996)Google Scholar
  18. 18.
    Leuschel, M., de Schreye, D.: Creating specialised integrity checks through partial evaluation of meta-interpreters. JLP 36(2), 149–193 (1998)zbMATHCrossRefGoogle Scholar
  19. 19.
    Lloyd, J.W., Sonenberg, L., Topor, R.W.: Integrity constraint checking in stratified databases. JLP 4(4), 331–343 (1987)zbMATHCrossRefMathSciNetGoogle Scholar
  20. 20.
    Martinenghi, D.: A simplification procedure for integrity constraints (2004),
  21. 21.
    Mayol, E., Teniente, E.: A survey of current methods for integrity constraint maintenance and view updating. In: Advances in Conceptual Modeling: ER 1999 Workshops. LNCS, vol. 1727, pp. 62–73. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  22. 22.
    Naughton, J.F.: Minimizing function-free recursive inference rules. J. ACM 36(1), 69–91 (1989)zbMATHCrossRefMathSciNetGoogle Scholar
  23. 23.
    Naughton, J.F., Ramakrishnan, R., Sagiv, Y., Ullman, J.D.: Efficient evaluation of right-, left-, and mult-lineare rules. In: Clifford, J., Lindsay, B.G., Maier, D. (eds.) Proceedings of the 1989 ACM SIGMOD International Conference on Management of Data, Portland, Oregon, pp. 235–242. ACM Press, New York (1989)CrossRefGoogle Scholar
  24. 24.
    Nicolas, J.M.: Logic for improving integrity checking in relational data bases. Acta Informatica 18, 227–253 (1982)zbMATHCrossRefMathSciNetGoogle Scholar
  25. 25.
    Nienhuys-Cheng, S.H., de Wolf, R.: The equivalence of the subsumption theorem and the refutation-completeness for unconstrained resolution. In: ASIAN 1995, pp. 269–285 (1995)Google Scholar
  26. 26.
    Qian, X.: An effective method for integrity constraint simplification. In: Proceedings of the Fourth International Conference on Data Engineering, pp. 338–345. IEEE Computer Society, Los Alamitos (1988)CrossRefGoogle Scholar
  27. 27.
    Robinson, J.A.: A machine-oriented logic based on the resolution principle. J. ACM 12(1), 23–41 (1965)zbMATHCrossRefGoogle Scholar
  28. 28.
    Sáenz-Pérez, F.: Datalog educational system v1.1. user’s manual. Technical Report 139-04, Faculty of Computer Science, UCM (2004), Available from
  29. 29.
    Seljée, R.: A Fact Integrity Constraint Checking System for the Validation of Semantic Integrity Constraints after Updating Consistent Deductive Databases. PhD thesis, Tilburg University (1997)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Davide Martinenghi
    • 1
  • Henning Christiansen
    • 1
  1. 1.Computer Science Dept.Roskilde UniversityRoskildeDenmark

Personalised recommendations