page 1  (16 pages)
2to next section

Page 1

Specification and Implementation of Consistency

Constraints in Object-Oriented Database Systems:

Applying Programming-by-Contract

Andreas Geppert, Klaus R. Dittrich

Institut fuer Informatik, Universitaet Zuerich, Switzerland
{geppert | dittrich}@ifi.unizh.ch

Abstract

We describe an approach to the specification and implementation of consistency constraints in object-oriented database systems, adopting the programming-by-contract paradigm developed for object-oriented programming. We also investigate how consistency constraints specified in programming-by-contract can be transformed into production rules of an active, object-oriented database system.

Keywords: object-oriented database systems, consistency constraints, active database systems

1 Introduction

In addition to the tasks of modeling, storing, and retrieving data, a database system (DBS) has to prevent database states that do not represent legitimate models of the miniworld of interest. The DBS has to perform consistency maintenance, which comprises three tasks: ? the DBS has to provide means to define consistency constraints pertaining to the miniworld under consideration,
? inconsistent situations in the database have to be detected, and
? in case of inconsistencies, consistency has to be enforced.
We investigate these three tasks in the context of object-oriented database systems (ooDBSs). In this context, the requirements for consistency maintenance are as follows: ? consistency constraints should be defined in a declarative way instead of as code fragments, ? the approach to define consistency constraints should be well integrated with the objectoriented style of defining and manipulating classes and objects,
? the approach to define consistency constraints should take the behavior of objects into account, ? constraint maintenance should be applicable to persistent and volatile (non-persistent) objects (provided that applications access and manipulate both persistent and non-persistent objects),
? detection of consistency violations should be efficient,
? the concept should support efficient repairing of inconsistent situations.
In this paper, we adopt the Programming-by-Contract paradigm (PbC) [15] developed for object-oriented programming languages for consistency maintenance in object-oriented database

Accepted for GI-Conf. Datenbanksysteme in
B?ro, Technik und Wissenschaft (BTW), Dresden
(Germany), March 1994