Abstract
This article presents a database programming language, Thémis, which supports subtyping and class hierarchies, and allows for the definition of integrity constraints in a global and declarative way. We first describe the salient features of the language: types, names, classes, integrity constraints (including methods), and transactions. The inclusion of methods into integrity constraints allows an increase of the declarative power of these constraints. Indeed, the information needed to define a constraint is not always stored in the database through attributes, but is sometimes computed or derived data. Then, we address the problem of efficiently checking constraints. More specifically, we consider two different problems: (1) statically reducing the number of constraints to be checked, and (2) generating an efficient run-time checker. Using simple strategies, one can significantly improve the efficiency of the verification. We show how to reduce the number of constraints to be checked by characterizing the portions of the database that are involved in both the constraints and in a transaction. We also show how to generate efficient algorithms for checking a large class of constraints. We show how all the techniques presented exploit the underlying type system, which provides significant help in solving (1) and (2). Last, the current status of the Thémis prototype is presented.
Similar content being viewed by others
References
Atkinson, M. and Buneman, P. Types and persistence in database programming languages.ACM Computing Surveys 0(0):00-00, 1987.
Benzaken, V. and Doucet, A. Thémis: A database programming language with integrity constraints.Proceedings of the Fourth International Workshop on Database Programming Languages, Workshop in Computing, New York, 1993.
Benzaken, V., Doucet, A., and Schaefer, X. Integrity constraint checking optimization based on abstract databases generation and program analysis.Journal de l'Ingénierie des Systèmes d'Information, 1(3):9–29, 1995.
Benzaken, V., Lécluse, C., and Richard, P. Enforcing integrity constraints in data-base programming languages.Proceedings of the Fifth International Workshop on Persistent Object Systems, Workshop in Computing, Pisa, Italy, 1992.
Blaustein, B.T., Enforcing database assertions. Ph.D. thesis, Harvard University, Computer Science Department, Cambridge, MA, 1981.
Bry, F., Decker, H., and Manthey, R. A uniform approach to constraint satisfaction and constraint satisfiability in deductive databases.Proceedings of the EDBT International Conference, LNCS 303, Venice, Italy, 1988.
Bry, F. and Manthey, R. Checking consistency of database constraints: A logical basis.Proceedings of the VLDB International Conference, Kyoto, Japan, 1986.
Cardelli, L. A semantics of multiple inheritance. In:Semantics of Data Types, LNCS 173, Springer-Verlag, 1984, pp. 51–67.
Cardelli, L. Basic polymorphic type checkingScience of Computer Programming 8(2):147–172, 1987.
Cardelli, L. Structural subtyping and the notion of power type.ACM POPL International Conference, San Diego, CA, 1988.
Cardelli, L. and Wegner, P. On understanding types, data abstraction and polymorphism.ACM Computing Surveys, 17(4):310–440, 1985.
Castagna, G.: Covariance and contravariance: Conflict without a cause.ACM Transactions on Programming Languages and Systems, 17(3):220–237, 1995a.
Castagna, G. A. proposal for making O2 more type safe. Rapport de Recherche liens-95-4, LIENS, March 1995b.
Castagna, G., Ghelli, G., and Longo, G. A calculus for overloaded functions with subtyping.Information and Computation, 117(1):115–135, 1995.
Cousot, P. and Cousot, R. Static determination of dynamic properties of programs.Proceedings of the Second International Symposium on Programming, Location?, 1976.
Gardarin, G. and Melkanoff, M. Proving the consistency of database transactions.VLDB International Conference, Rio, Brazil, 1979.
Hsu, A. and Imielinski, T. Integrity checking for multiple updates.Proceedings of the ACM SIGMOD International Conference, Austin, TX, 1985.
Hull, R., Morrison, R., and Stemple, D., eds.International Workshop on Database Programming Languages. Salishan Lodge, OR, 1989.
Kowalski, R., Sadri, F., and Soper, P. Integrity checking in deductive databases.Proceedings of the VLDB International Conference, Brighton, UK, 1987.
Martin, H. Contrôle de la cohérence dans les bases objects: Une approche par le comportement. Ph.D. thesis, Université Joseph-Fourier—Grenoble I, 1991.
Nicolas, J.M. Logic for improving integrity checking in relational databases. Technical report, ONERA-CERT, 1979.
Sheard, T. and Stemple, D.: Automatic verification of database transaction safety.ACM Transactions on Database Systems, 14(3):322–368, 1989.
Stonebraker, M. Implementation of integrity constraints and views by query modification.ACM SIGMOD International Conference, San Jose, CA, 1975.
Weber, W., Stugky, W., and Karzt, J. Integrity checking in database systems.Information Systems, 8(2):125–136, 1983.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Benzaken, V., Doucet, A. Thémis: A database programming language handling integrity constraints. VLDB Journal 4, 493–517 (1995). https://doi.org/10.1007/BF01231645
Received:
Revised:
Accepted:
Issue Date:
DOI: https://doi.org/10.1007/BF01231645