Active database

From ArticleWorld


Active database management systems (ADBMSs) refer to those database systems that are able to detect and respond automatically to events internal or external to the database. An ADBMS is an example of an active system, i.e. a system wherein the responsibility for event detection and action execution is vested by the development system, rather than by an application program.

Contents

Active and passive databases – an example

Consider an example wherein 500 more copies of a certain book need to be ordered when the stock of that book falls below a certain threshold level (say 10 books). To address this situation in a passive database (DBMS), the administrator may choose from two options. One is to check whether the above situation has occurred after every sale. However, this will result in additional overhead for application programs. A second choice will be to use a separate application for periodically polling the database to find out the available stock. Although this is better (in that it is implemented in one place) than the first option, it may be difficult to determine an appropriate polling frequency. A very high polling frequency may prove to be expensive, while a very low frequency will result in late reactions.

Active databases support the above feature by moving the reactive behavior from the polling application into the DBMS itself. This allows active database to recognize predefined situations and react in a timely manner. The active database provides a mechanism for administrators to describe the reactive behavior (also known as the knowledge model). It also provides support for monitoring and reacting to relevant circumstances (also known as the execution model).

The knowledge model

The ECA (Event-Condition-Action) model is currently the most common approach for specifying the knowledge model. The ECA rule has three parts:

  • WHEN event occurs (here the triggering action is specified)
  • IF condition holds true (a query is made to the database)
  • DO execute action (this part consists of instructions that may call another procedure, trigger, etc. or directly make changes to the database)

Variations on the ECA are the EA (Event-Action or Unconditioned) rules and CA (Condition-Action or Production) rules.

The execution model

The execution model is used for the purpose of supporting rule execution in the ADBMS. This model is responsible for determining when the rules are to be executed and the properties of their execution.

Use of active databases

Active rules in ADBMSs can be used to support functionalities such as integrity management (such as referential integrity), derived data management or views, transaction logging, change notification and so on. Active database technology has been introduced in the SQL 99 standard as well as in commercial systems like Oracle. Although there has been considerable effort made towards improving the understanding of active database systems, relatively little work has been done on standardization.