Extending an ORDBMS: The StateMachine Module
Wolfgang Mahnke 2
1DaimlerChrysler AG
Research & Technology
P.O.Box 2360
89013 Ulm
Germany
hans-peter, steiert @ daimlerchrysler.com
Christian Mathis 2
Hans-Peter Steiert 1
2University of Kaiserslautern
P.O.Box 3049
67653 Kaiserslautern
Germany
{ mahnkelmathis } @ informatik.uni-kl.de
Abstract
Extensibility is one of the mayor benefits of ob-
ject-relational database management systems. We
have used this system property to implement a
StateMachine Module inside an object-relational
database management system. The module allows
the checking of dynamic integrity constraints as
well as the execution of active behavior specified
with the UML. Our approach demonstrates that
extensibility can effectively be applied to inte-
grate such dynamic aspects specified with UML
statecharts into an object-relational database
management system.
1 Motivation
Object-relational database management systems (ORD-
BMS) enable us to extend their off-the-shelf functionality
by self-developed extension modules [6]. This allows us to
adopt an ORDBMS to the needs of several application do-
mains. Our demonstration illustrates how this feature can
be exploited to equip an ORDBMS with a module which
handles dynamic aspects inside the database system.
In our SERUM project [3], we use an object-oriented
specification as an input to generate data storage compo-
nents. Since UML [4] offers a rich set of object-oriented
constructs and is widely used, we have chosen it as speci-
fication language. Class diagrams are used to describe the
Permission to copy without fee all or part of this material is granted
provided that the copies are not made or distributed for direct
commercial advantage, the VLDB copyright notice and the title of the
publication and its date appear, and notice is given that copying is by
permission of the Very Large Data Base Endowment. To copy otherwise,
or to republish, requires a fee and~or special permission from the
Endowment.
Proceedings of the 28th VLDB Conference,
Hong Kong, China, 2002
data structures, and the mapping of these structures to an
object-relational schema is straightforward. Each class of
the class diagram is mapped to a row type and a typed table
in the database schema. Inheritance relationships can be
mapped onto table inheritance (see [2] for details and prob-
lems with multiple inheritance). Methods declared in the
class diagram are implemented as user-defined routines
(UDRs) in the ORDBMS, and associations can be estab-
lished in several ways, e.g., by using foreign keys. These
mappings do not only apply to the SERUM context, but are
a general approach when implementing an object-relation-
al schema on the basis of an object-oriented specification.
in addition, the capabilities of ORDBMSs allow to con-
sider dynamic modelling aspects, too. UML statechart dia-
grams are an appropriate way to specify these aspects. In
the context of ORDBMS-based data storage components,
statecharts can be used for two purposes [5]:
Observing dynamic integrity constraints
In contrast to static integrity constraints describing the
correctness of a database state, dynamic integrity con-
straints restrict the transitions between different states.
For this purpose, valid sequences of operations, pre-
and post-conditions for transitions, and state-depen-
dent invariants can be specified. Whenever such a con-
straint is being violated, the conflicting operation has
to be prevented.
Implementing active behavior
Statecharts can be used to specify functionality in form
of actions which have to be executed when the trigger-
ing event occurs. There are predefined events in an
ORDBMS, e.g., INSERT, UPDATE, or DELETE
events on tables, which can be used by SQL triggers.
Furthermore, application-specific events can be
defined and triggered by UDR calls or, in turn, by the
actions of the statecharts.
UML statecharts specify dynamic aspects of a class or an
operation. We restrict our demonstration to statecharts de-
1079

Get Proceedings 2002 VLDB Conference now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.