3. Definition:
A database that has the ability to spontaneously react
to events occurring inside as well as outside the
system is called active database.
The ability to respond to external events is called
active behaviour.
The active behaviour is based on the rules that
integrate a event with the desired effect.
This behaviour is commonly defined in terms of ECA
rules allowing system to react to specific events.
4. Active Rules(Production
Rules)
The active behaviour is achieved through the
production rules/ active rules.
The active rules are stored programs called
triggers that are fired when an event occurs.
Triggers are written to respond to DML(select,
insert etc), DDL( create, alter etc) and Database
Operations( Log-On, Log-Off )
These triggers can be defined on table/view or
the database to which event is associated.
5. Architecture
The architecture depends on the knowledge model
and execution model
Knowledge model for triggers:
What kind of rules will be supported?
What these rules are?
Classification of rules at security levels
Execution model:
Specify runtime strategy for rule execution
Ensure that no illegal information should flow due to
execution of a trigger
6. There are two types of architecture for active databases:
Built-in Architecture
Layered Architecture
7. Built-In Architecture
Active database components become part of
database.
Can be achieved by two models:
Implementation from scratch: active components
are implemented as a part of database from
scratch.
Integrated Architecture: This involves modifying and
extending the existing passive database.
8. 1. Event Detector: It detects any external event
occurring and informs the condition manager about it.
2. Condition Monitor: It evaluates the conditions of
rules associated with events that have been detected by
the event detector.
3. Scheduler: It compares recently triggered rules
9. with those that have previously been triggered,
updates the conflict set, and fires any rules that are
scheduled for immediate processing.
4. Query Evaluator: It executes database queries or
actions. Access may be required both to the current
state of database and to past states in order to
support monitoring of how the database is evolving.
10. Layered Architecture:
Active database components are built on top of
existing passive database system.
Layered approach is better for active object oriented
database when base system is object oriented
database, as it allows reusability of constructed rules
for other tables/databases.
It is easier to modify the rules according to the
evolving needs.
11. As evident from the diagram the active rules are
implemented on the top of existing database.
12. Features
All the features of a conventional database apply to
active database too.
Support ECA rules
Detect the occurrence of events.
Evaluate conditions to execute actions.
Support programming environment.
13. Advantages
The triggering capabilities enhances the
functionalities of traditional database.
Same event-driven rules can be applied to every
relevant operation of an organisation.
Triggers can improve the working of a database by
removing repetitive error check and correction.
The inference power of ECA rules makes active
database systems a suitable platform for building
large and efficient knowledge base and expert
systems.
14. The ECA rules help in:
Enforcing integrity constraints.
Implement version control policies
Implement triggers and alert systems.
Enforce access constraints.
Gather statistics for query optimization.
15. Disadvantages
Lack of standardization
Has been mostly implemented for centralized dbms.
Distributed, parallel dbms has not been considered.
The layered approach is beneficial in terms of
construction cost, but the entire system cannot be
optimized comprehensively and this degrades
runtime performance.
Optimizing large applications is rendered difficult by
the separation of transactions and triggers and the
misunderstanding of their fine-drawn interactions.
16. Applications
Production control e.g. Power plants
Maintenance tasks
Share trading
Air Traffic control
Statistics gathering and authorization tools