Database technologies for engineering applications
since 25 June, 1998, last modified 25 June, 1998
In this section, we review database technologies that support facilities for engineering applications. These databases include object-oriented databases, active databases, and heterogeneous databases.
Basic Concept of Object-Oriented Database
- object - all conceptual entities
- attribute - some private memory that hold object's state
- method - procedures encapsulate the behavior of objects
- message - a medium through which an object can communicate with one another
- class - a set of similar objects; all the objects described by the same set of attributes and methods
- inheritance -
- domain - the domain of attributes can be other classes
Schema Evolution in Object-Oriented Databases
- Schema - the class definitions and the inheritance structure of the class lattice
- Conventional databases (e.g. SQL/DS) provide dynamic creation and deletion of relation and addition of new
- columns in a relation without requiring system shutdown
- Program language oriented databases have deficiencies for schema change
- Taxonomy of schema change and invariant
Taxonomy of Schema Change and Invariants
- Changes to the contents of a node
- Changes to an attribute
- Changes to a method
- Changes to an edge
- Changes to a node
- Invariance
- Class lattice invariant
- Distinct name invariant
- Domain compatibility invariant
Transaction Management of Object-Oriented Databases
- Serializable transaction
- Session - a sequence of transactions
- Long duration transactions as a set of transactions, rather than a sequence of transactions
- Any active transaction of a session will compete for resource with those of all other session
- Norman and Hypothetical transaction - a transaction which always aborts.
- Experimenting with the effects of 'what-if' changes to the database
Event-Condition-Action Rule [Urban,1994]
- The event specifies an operation or situation to be monitored
- When event occurs, the condition is then evaluated
- If the condition is true, the action is triggered automatically by database systems
- Alter, Trigger, Integrity Maintenance Rule (IMR)
- Alter - no action only send message to the user
- Trigger - causes a specific database or application action
- IMR - specifically developed to maintain constraints
An Active Database Model [Beeri1993]
- In active databases operations can act as triggers that cause the execution of other operations.
- Its advantages include, among others, code reuse, and centralization of code storage and management.
- model of nested transactions in which transactions can have sub transactions, thus allowing for a hierarchical
- organization of processing.
- Object-oriented database supports the representation of data processing in the form of code.
- Active Database, OODB, nested transactions
What an Active Database Model needs
- How are triggers specified;
- When are triggers enabled and executed;
- How is the environment of trigger execution specified and implemented;
- How do we specify and concurrently enabled triggers.
The Database Model
- Object, Methods, Classes and Encapsulation
- Encapsulation : An object encapsulates both data(its state) and behavior(its methods) and can only be
- manipulated using the(external) methods associated with it.
- Postulate that the methods are the triggering events.
- The triggered operations are methods.
- OODB's allow redefinition(overriding) of methods in subclass, even redefining methods for individual objects in a class.
- In the nested transaction model a transaction may execute both operations and sub transactions.
Methods and Triggered Actions
- TYPE method = [ m-name, m-code]
- extension for triggers
- TYPE method = [m-name, m-code, {triggered-action}]
- triggered-action is name of an action.
- An Example
- - Database stores information about customers account and calculate total balance of a customer's account.
Triggered Actions Scheduling
- When should the trigger be executed?
- In HIPAC ; immediate, deferred, and decuple execution
- execution interval: in which triggered action should be executed
- example: update-account before get-balance
- TYPE execution-interval = [start-event, end-event]
- Two observations; execution in appropriate time, possibility of defining interval.
Failures
- transaction management sub language: used in triggered action definition for specifying what should be done in the various failure case
- Triggering Method Failure
- Either case; roll back of triggered action, execution as planned (log system example)
- HIPAC's decoupling mechanism
- Independent from top transaction (ignore, abort)
- Failure in execution interval specification
Triggered Action Failure
- example of recalculation of balance
- If recomputation(triggered-action) is fail,
- 1) roll back the balance update that triggered it
- 2) retry to execute and block retrievals of the total balance
- " Try to run the action at lease 5 times and if they all fail try to run t instead. If t also fails, abort the transaction"
The Triggered Action Description
- should include action and target object
- TYPE triggered-action-description = [triggered-action, act-to-perform(location, parameters), execution-interval, scheduling-information, triggered-action-fail, trigger-fail]
- - triggered-action :- name of the trigger
- - act-to-perform :- name of the action to be taken
- - scheduling-information :- priority and etc.
Active Objects
- structure used for storing information about triggered actions
- until executed.
- for each action waiting for execution
- TYPE active-action = [triggered-action(parameters), triggering-method-identity(location),...]
- location describes the object where the triggering method executed
Methods for Handling The Active Part
- inserting, retrieving and executing, and deleting active-actions
- use for every triggered-action
An Execution Model
- So far what information and how it is recorded
- method processor
- General Execution Plan
- set of actions T1 : do not use any of parameter off M or do T2 : Scheduled after m terminates
Korean Engineering Databases ¨Ï copyright Namchul Do, 1998