Active and passive rules in database systems - CiteSeerX

0 downloads 0 Views 183KB Size Report
to specify individual reactions of a soft- ware system that are ... Furthermore, don't expect a scienti c pa- per in the .... sen for formulating passive rules, but even.
Active and passive rules in database systems: How do they relate? Rainer Manthey Department of Computer Science III University of Bonn Romerstrae 164, D-53117 Bonn, Germany e-mail: [email protected]

Abstract

\rule" which have been investigated:  Active rules are speci cations of stereotypical reactions to be automatically initiated by a DBMS in response to the detection of particular DB-related events. Active rules have been called triggers or production rules as well.  Passive rules are collective speci cations of datasets by means of database queries, automatically activated by a DBMS in reaction to queries or updates. Passive rules are known as views, deductive rules or derivation rules as well. The research area devoted to the investigation of passive rules is called \deductive databases" and has been wellestablished since the early seventies. \Active databases" are under investigation since little more than a decade only, but can be considered a very active and attractive area of research today. Most database conferences o er one or more sessions on active and/or deductive databases, or simply on rules in general. Tutorials on both areas have been o ered regularly at major international events in the recent past. There is a new series of conferences (the DOOD conferences) devoted to deductive databases (in connection with objectoriented data models). Special issues of

Two areas of database research are concerned with combining classical database facilities and particular forms of rules: Active rules (or: triggers) are investigated under the \label" active database. Passive rules (or: deductive rules) are the main concern of the deductive database direction. In order to correctly classify these two concepts in theory and practice, it is very important to understand how the two paradigms relate: Does the one subsume the other? Are they competing or complementary? In which cases should active rules be preferred to deductive ones, and vice versa? Although these questions have been under debate for some time, there is no agreement yet on how to relate active and deductive databases - probably due to the fact that both paradigms are still not well enough understood by the research community. In this paper, we try to summarize the current state of the discussion and develop a proposal for classi cation and motivation of the two kinds of DB rules.

1 Introduction A considerable amount of research in the database eld is nowadays devoted to the investigation of rules and rule activation in the context of large datasets. There are two main interpretations of the notion 1

ing systems, autonomous processes, reactive systems and other more recent developments are dealing with variations or extensions of basically the same idea: How to specify individual reactions of a software system that are driven implicitly by events observed by the system rather than via direct, explicit programmer interaction. Deductive rules and databases are closely related to clauses and programs in logic programming, a very popular and constantly growing sub eld of AI as well as a branch of programming language research [Llo87]. Other AI directions such as knowledge representation or concept languages are dealing with similar concepts. Last not least, axioms in automated reasoning are often used and activiated in a very similar way as deductive rules. The database community did not invent or create any of the rule notions discussed in this paper! However, there are a couple of new and speci c issues and solutions arising from or developed by this community, due to the particular characteristics and demands of the database area. There is also a particular \DB culture" around, resulting in approaches to rule syntax, semantics and pragmatics that are in a sense typcial for the DB view, and di er considerably from the terms and tools commonly used in AI or programming. It is this \database" point of view which we are following throughout this paper. During a recent international workshop on active databases at Schlo Dagstuhl, the German national research and conference center for computer scientists, one of the main topics of discussion - even among the top-specialists present! - was exactly this question: How do active and passive rules relate? The debate was a controversial one and did result in as many open issues as settled, agreed ones. For all these reasons we believe, that written attempts to introduce, motivate, relate and discuss active and deductive databases in their

database journals have been focussed on the one or the other rule paradigm as well (e.g., [VLDB94], [IEEE92], [ACM89]). All these examples of more recent activities in the international research community illustrate the degree of interest in and e ort towards developing database systems that support either one, or, even better, both forms of rules. Despite all these activities, it is by no means clear how the two di erent paradigms \sharing" the same name, rule, are actually related, or more precisely, how they should be related. Such questions are to some degree non-technical ones: one cannot simply go and prove that deductive rules are subsumed by active rules, or that systems supporting deductive rules can do without active rules, or anything the like. First of all, there are many di erent special instances of the two general paradigms around. Taking a detailed formalization of particular such instances, e.g., the Starburst (active) rule system and the LDL (passive) rule language, one might be able to come up with such \proofs" though. But the more serious obstacle against a straightforward comparison is the question how to actually deal with the di erences between the paradigms, how to decide in case of tradeo s between positive or negative characteristics of the respective rule paradigm, and so on. Questions of this kind are probably beyond the scope of purely academic investigations in representation power or isomorphic mappings, but are subject to pragmatic, philosophical, thus ultimately subjective criteria. Another diculty further complicating the matter comes from the observation that closely related concepts have been proposed, introduced, investigated and applied in other areas of computer science. The active rule concept has been strongly in uenced by developments in AI, particularly in expert systems and production systems [Bay93]. Demons in operat2

role as database paradigms \per se" are necessary for those not so familiar with rules, and might be bene cial even for those actively working in the area. This paper tries to contribute to the discussion outlined here, but does not pretend to always o er de nite, commonly agreed and well-accepted views. Some statements made in the following will therefore re ect the personal opinion of the author only. Furthermore, don't expect a scienti c paper in the normal sense, full of formalism and technicality, but a paper \about" some important scienti c concepts, consciously written in an informal style in order to address a wide range of potential readers. The paper will be organized as follows. In section 2 we will provide a short introduction to the two rule paradigms not aiming at a decent account for the stateof-the-art, but highlighting the most important features shared by the majority of passive and active rule languages. In section 3, we brie y review some of the motivations for using rules that have been identi ed or proposed up till now. In section 4, we nally address the main topic of this paper and discuss how active and deductive databases can be related and how we think they should be viewed and used.



people familiar with rules, but not decided about their relationship: For them, the paper (hopefully) provides \food for thought", but a detailed introduction is not necessary for this group.

Nevertheless it is required to have a minimal basis for common understanding. It is the purpose of this section to reach such level of agreement. We do not intend to enter the debate, which form of syntax or semantics to choose for the one or the other rule paradigm. In view of being able to write down some short and simple examples, we will choose a form which we regard as most convenient and understandable without any formal e ort. However, this choice does not imply any recommendation or preference! There are many good reasons to do things in a completely di erent way, and many important aspects of rule languages are not at all addressed within this text. As a basis for the remainder of this paper, we introduce now a very general definition of rules. What is really characteristic for active and passive rules?

2.1 Passive rules

2 Rules in a nutshell

Passive rules are a means for de ning a dataset indirectly (or implicitly or intentionally) via a de ning expression, consisting of a general condition constructively de ning elements of that set. Whether the dataset under consideration is a relation, or an entity set, an object class or a partial function, doesn't matter at all, but depends on the data model chosen. There are di erent special problems arising due to the particular model chosen, but the basic issues and techniques are always the same. In the literature on deductive databases, the relational model of data has very often been chosen. This

In the following, we will introduce both, active and passive rules, in a very general manner, not entering into detailed problems of syntax and semantics. This paper is not to be understood as a \mini tutorial"! We are addressing two kinds of readers:  people not familiar with rules at all: For them, the paper should provide a rst \ avor" of the concepts developed and of the problems arising, but no detailed introduction. 3

is the de ning expression, in this case a conjunction of two atomic formulas, expressing the condition that employees are subordinate to the managers of the departments they work for. In the general case, the rule body is an arbitrary query the evaluation of which over the database is supposed to yield substitutions of the free variables in the head of the rule. Each possible substitution over the actual state of the database leads to one instance of the new dataset. The semantics of the rule, however, is the set of all such derivable facts.

is mainly a historical circumstance and not characteristic for deductive rules at all! In fact a closer study of other data models shows that deductive features have been introduced in many di erent models (though not always explicitly called like that). Currently, particular e orts are made to introduce rules into an objectoriented context. \De nitions" declaring deductive databases as extensions of relational databases can be found rather frequently, but should be considered as inappropriately limited and unnecessarily narrow. The following expression constitutes a typical example of a passive rule:

In the body of a passive rules one may refer to other rule-de ned datasets in turn, so that hierarchies of rule-de ned datasets will result. By doing so, it is possible to establish complex abstraction hierarchies, consisting of various levels of rule-de ned concepts without actually changing the structure of the data stored physically in the database. Rule-de ned concepts may even depend on themselves, thus leading to recursive de nitions. Moreover, several rules may jointly be used for de ning a dataset, each rule representing an individual case or aspect of the concept. As a representative example of both features, multi-rule de nitions and recursion, consider the famous de nition of the transitive closure of a graph by means of two rules:

subordinate(Empl, Mgr)

Suggest Documents