Computers and Industrial Engineering Vol. 25, Nos 1-4, pp. 313-316, 1993 Printed in Great Britain. All rights reserved
0360-8352/9356.00+0.00 Copyright © 1993 Pergamon Press Ltd
ACTIVE DATABASE AND ITS UTILIZATION IN THE OBJECT ORIENTED ENVIRONMENT
Bert Naquin and Dia Ali University of Southern Mississippi Department of Computer Science Southern Station, Box 5106 Hattiesburg, MS 39406-5106
ANBTRACT
Event Driven - A system which can take action when an event occurs within the system itself.
Investigation into the concept of active database and the advantages to be realized of its use, in particular in the field of industrial engineering, to produce a better quality of database in a shorter time frame. Both passive and active databases can be manipulated by commands issued by users or applications. Yet, active database uniqueness lays in its ability to manipulate itself. It is possible for a command to originate from the active database itself instead of from some outside control mechanism. Hence, the database controls actlvely some of its own functions.
Class - A group of database objects with similar characteristics.
INTRODUCTION
Database development has had some major innovations in the last ten years. Yet, most database developers believe that we have just scratched the surface. The driving force behind database development is the expanded expectations and demands on database managers. One constant demand of our databases is more efficient application development. Another constant demand is to create applications which are easily maintainable. These two demands have lead us to a new database concept: the concept of an active database rather than a passive one. Briefly, both passive and active databases can be manipulated by commands issued by users or applications. Yet, active database uniqueness lies in its ability to manipulate itself[i]. It is possible for a command to originate from the active database itself instead of from some outside control mechanism. Hence, the database controls actively some of its own functions.
The feasibility of utilization of an active database in the area of object oriented environment is investigated. The characteristics of active database which can be used to create a very efficient database is outlined. A proposed methodology which defines levels of activity in a database is outlined.
TERMB
Trigger - An active database procedure which executes on the occurrence of an event which is defined inside of the procedure. Constraint - An active database rule implemented with a procedure which defines certain relationships between objects.
ADVANTAGES OF AN ACTIVE D A T A B L E
An active database has many advantages over a passive database. Reduced application development time and cost are main factors in using the active environment. The reduced application development time can be realized in the active environment with the implanting of reusable statements or blocks of code inside of the database instead of duplication in several different applications. This concept also leads to application code improvement. The reduction of the
Event - A noticeable change in a database attribute or database schema. Method - A procedure defined within an object which causes the object to be viewed as a complex object. Command Driven - A system which will only take action when given a command from outside of the system.
313
314
Proceedings of the 15th Annual Conference on Computers and Industrial Engineering
number of lines of application code will lead to easier maintenance. Reduced application maintenance cost is also an advantage of an active database. A key way to reduce maintenance cost, for example, occurs when a certain relationship between two objects may need to be changed. In an active environment, this can be accomplished by simply making the necessary changes to the associated active database components where there is no duplication. In the passive environment, the changes would need to be made to the application code, with the worse case being to all of the applications which execute on this relationship and the best case being to a limited number of procedures which execute on this relationship. The active environment has advantages over either case of the passive. The main advantage is no recompilation of the active environments' applications, because the active components reside and execute from the database not from the application[2]. In contrast, the passive environment would need to recompile all application code that pertains to the change in relationship. The active environment should produce better database structure. Simply, the database structure which comes from the database design is stored within the database, instead of implemented within application code, which leads to better database design and more simplified code. The structure contained within the database leads to more consistent data, because data control is implemented from one place within the database and not several places in application code. An advantage of a structured database is being able to test the data integrity at the design level in contrast to the passive environment where data integrity needs to be tested each time an application program is written or changed. More reliable structure and data integrity leads us to easier user development of application programs. If the security and data integrity issues can be handled within the database design, then database managers could be less wary of end users developing applications. These user programs could be viewed as high level data interpreters, since they cannot change the database or its structure unless allowed by the restrictions residing within the database[2]. The components of an active database such as packages, triggers, constraints and methods which are event driven should be devised very carefully during the design stage because of the magnification of their use. They should be optimized and tested thoroughly before their implementation.
ACTIVE OBJECT
DATANUE TECHNOLOGIES O R I E N T E D ENVZRONMZNT8
FOR
The demand to store dataintensive objects has lead to the development of object oriented database design. In an object oriented database, objects are used as the main data storage component in contrast to a record in a traditional database design. An example of a data intensive object within the field of engineering technology could be a CAD component which can be stored more logically in an object oriented environment rather than a relational one. The object oriented database management system (OODBMS) includes the persistent storage of data needed in all database systems with the power of object oriented programming languages such as C++. Given the advantages of an OODBMS, the competitive development of these systems is understood. There are several comprehensive OODBMSs on the market which have been developed within the last few years: example, GemStone and Itasca.
for
The concept of an active database is more suited to the object oriented model than it does to the relational model. The ability to store complex objects has evolved in the object oriented database technology. A complex object is defined as an object which contains data attributes and a procedure referred to as a method in [3]. The inherent method can contain code which defines relationships that pertain to the object. The question is "By having the ability to store a method within the object, does this give us an active database?". By the definition of an active database given in this paper, the ability to store a method within an object in the database gives an active database. Now, to what degree would one define the activity of the database? The authors propose that different levels of activity within an object oriented environment can be developed, and the database must pass the first level in order to get full benefit of an active database much the same way the reader must reach a certain level of normal form in order to benefit from the relational model. PROPOSED L~L8 ACTIVE D&TUANE
OF ACTIVITY
WITHIN
AN
The first level of activity of a database is defined when a method is simply a value split into two or more parts. A method working on this level would simply accumulate the data from the different parts and return the composite value to the object. An example of proposed first level of activity is shown in Figure i. In this example first level of activity, consider an object representing a
NAQUIN and ALl: Object Oriented Environment
315
Object: Inventory Serial Number Name Description Number in Stock Method: * Cost
Figure I.
First Level Example
particular Inventory Item; for example, a piece of machinery might have attributes including serial number, name, description and a method for the cost where the cost is split into shipping cost and item c o s t . The method could simply add shipping and part cost attributes from two other objects and return the value to the cost of the original object. The second level of activity of a database utilizes active components to ensure data integrity. This level actively controls what is entered, deleted or changed in a class of objects. This is a case where a method acts as a constraint on certain attributes within an object. An example of proposed second level of activity is shown in Figure 2. In this example second level of activity, consider an object representing an Employee with attributes such as name, social security number, address and department. Another object would represent Class Department with attributes such as name, supervisor and employee. The constraint method
could limit any new object in the employee class to be restricted to only existing departments. The third level of activity of a database utilizes active components to manipulate other objects in the database. This level actively updates other objects. This is a case where a method is executed because of the occurrence of an event. This method can be used to update some other data object or objects. An example of proposed third level of activity is shown in Figure 3. In this example third level of activity, consider an object representing an Account with attributes such as account number, name, account type and balance. Another object would represent an ATM Transaction with attributes such as type, amount and a method called update_account. The method update account would be executed whenever a change to an ATM transaction occurs. The method would automatically update the account balance on the account object due to adding, deleting or changing of an ATM transaction.
Proceedings of the 15th Annual Conference on Computers and Industrial Engineering
316
Ob t Acc mt
Nam
mTyl Balm
ATMTransactiol Amount Met
Figure 2. SecondLevel Example
FigMzo 3. Third Level Example
CONCLUSION
[3]
Bertino, Database Concepts Computer,
[4]
U. Dayal, "Active Database Systems," Proceedings of the Third I~ternational Conference on Data and Knowledge Bases, 1988, pp. 150-169.
[5]
M. Hsu, R. Ladin, D. McCarthy, "An Execution Model for Active DB Management Systems," Proceeding of the Third International Conference on Data and Knowledge Bases, 1988, pp. 171-179.
[6]
N.H. Gehani, H.V. Jagadish, "Ode as an Active Database: Constraints and Triggers," Proceedings of the Seventeenth International Conference on Very Large Databases, 1991, pp. 327336.
[7]
C. Beeri, T. Milo, "A Model for Active Object Oriented Database," Proceedings of the Seventeenth International Conference on Very Large Databases, 1991, pp. 337350.
The evolution of database technology has brought us the concept of an active database which has just recently been c l a l m e d b y s o m e software developers. For example, Oracle's version 7 (a relational database system) and Itasca (an OODBMS) have features which allow a database developer to take advantage of the active database concept. After stating the advantages of using active database concepts, the authors have defined three levels of activity to which active database concepts can be compared. By recognizing levels of activity in a database, the reader will be able to compare the rapidly growing number of software manufacturers who claim to have active database potential in their products. Future research is needed to further investigate the potential of using active database concepts in the object oriented environment. The restrictions and abilities of a method in a complex object need to be better defined. REFERBHCE2
[1]
Stephen Schur, "Active Database: EXploring the Next Frontier," Database Programming & Design, October 1992, pp. 41-47.
C2]
McComb and Griffin, "Leveraging Your Database Smarts," Database Programming & Design, August 1992, pp. 29-35.
"Object-Oriented Management Systems: and Issues,,, IEEE April 1991, pp. 33-47.