International Journal of Computer Applications (0975 – 8887) Volume *– No.*, ______2014

Object Persistence Techniques - A Study of Approaches, Benefits, Limits and Challenges

Clarence J M Tauro Ritesh Kumar Sahai Sandhya Rani A. Deparment of Computer Department of Computer Department of Computer Science Science Science Christ University, Bangalore, Christ University, Bangalore, Christ University, Bangalore, India India India

ABSTRACT exist, even when the application that created or used the Object-Oriented paradigm becomes pioneer and best choice object has finished execution. while selecting language and writing software solution. In last In an application, persistence can be implemented in many few decades there was significant change observed in ways, and few of them [16] are listed below: developing software solutions. Most of the application developers prefer the object oriented model to exploit its • Storing object in a simple text file benefits. The major benefit we can obtain from Object- • Storing object in an indexed sequence access mechanism Orientation is of course object itself and the feature that • Storing object in relational enable us making an object persistent. Object-Persistence • Storing in an Object-Oriented database feature contributes a major role in designing data model. If the techniques used for Object-Persistence are designed correctly A very simple way is to use text file as storage. All required then, we can obtain major benefits in the areas of software information can be stored on file by doing file write operation. productivity, maintainability and cost reduction. There are This stored information can be retrieved when restore is many ways of implementing Object-Persistence among which required by performing file read operation. This kind of Gateway-based method, Object-Relational database method persistence mechanism might be good for small applications, and Object-Oriented database method are the three major where limited information saving is required and information categories. does not change frequently. But, representing complex information in a text file is very complicated. Lot of In this paper, we discuss about the characteristics of various development efforts will be wasted in maintaining this. Object-Persistence techniques, the relevant areas in which However text files are very flexible, easy to implement, can those techniques can be employed efficiently and how those be accessed by more than one program, but they are not object techniques can be used effectively on the basis of application friendly [5]. Object-Oriented programs exhibit various kinds characteristics and requirements. We also discuss about the of relationships with other objects, for example inheritance benefits and limitations of persistence techniques. Further, our and references with other objects. The challenge here is how discussion continues on various challenges that come along we can represent and maintain the different kinds of the way of Object-Persistence and possible solutions to handle relationships on text file while saving the object. those challenges. Object-Persistence can also be implemented by another Keywords mechanism in which relational are used for object Object-Persistence; Gateway-Based Object-Persistence; storage. This approach is most appropriate for storing Object-Oriented Database; Object-Relational Database; Data business data as it can be easily formatted into rows and Model; Data Access; Data Sharing columns [16]. This mechanism can be a good choice when application needs database related functionalities like, 1 INTRODUCTION transaction with rollback, record locking and indexing. Object-Oriented development is bottom-up approach, which Databases are generally expensive; managing them is even focus on data instead of procedures that manipulates the data. more difficult. Object-Oriented instances are basically Object-Orientation is an efficient, powerful, reliable and well- structured in hierarchal order and relational database known technique that mimics a network of real life processes, structured in tabular format. These are two different structures scalable applications, tasks, and business rules of a domain. and a difference in two structures is known as “impedance An object present in a software application consumes some mismatch” problem [6]. Due to these limitations of databases, amount of memory space and exists for a specific time. When this mechanism is not a best solution. an object is being created by an application, the scope of object is limited to the application life cycle. When the Implementation mechanism for Object-Persistence can be application terminates, object’s life also terminates. The broadly classified into three categories. First one is the reason is, object is being stored temporarily in main memory. gateway-based approach which adds Object-Oriented To keep object alive, application need to store the object in programming access to persistent data stored using traditional persistence storage [1]. non Object-Oriented data stores. The second mechanism is the Object-Relational DBMS approach which enhanced the The concept of maintaining the state of an object is termed as extremely popular relational data model by adding Object- Object-Persistence. Object-Persistence refers to the concept of Oriented modeling features and the final mechanism is the saving the state of an object so that it can be restored and used Object-Oriented DBMS approach which adds persistence at a later time. An object that does not persist basically dies support to objects in an Object-Oriented programming when it goes out of scope [3]. A persistent object continues to language. OODBMS approach is more appropriate for unformatted and/or scientific information.

19 International Journal of Computer Applications (0975 – 8887) Volume 85 – No 5, January 2014

2 PERSISTENCE OF OBJECT - day by day. Due to this reason, there is a great demand to focus on different Object-Persistence techniques in order to FUNDAMENTAL APPROACHES develop more efficient object oriented applications. Object-Oriented languages mainly focus on objects, object state and their behavior. An object can be created, initialized, There are three major techniques used for implementing accessed and manipulated by certain methods defined in class. Object-Persistence namely Gateway-Based, Object-Relational By default, the object created by a program is transient, and DBMS and Object-Oriented DBMS techniques. Each of these object state is maintained till the program life. To maintain the techniques has their own advantages and limitations. So state of object beyond the program life, also called persistent selection of a best Object-Persistence technique clearly object, four approaches were identified and used widely in depends on the type and nature of the application. applications, namely persistence by class, persistence by creation, persistence by marking and persistence by 3.1 Gateway-Based Object-Persistence reachability. (GOP) The Gateway-Based Object-Persistence (GOP) approach is 2.1 Persistence by Class featured by being both application and data-independent. This The simple approach is to declare a class to be persistent. approach is mainly followed in applications in which Based on Object-Oriented property all objects that belong to traditional non-Object-Oriented data stores are used to store this class will become persistent. However this is not flexible, data for an object. as it is often required to have single class with both transient and persistent objects [4]. Declaring a class to be persistent is This approach is a middleware solution that attempts to bridge referred and interpreted as “persistable'' by many OODB the gap between the Object-Oriented paradigm data model systems; objects belonging to the persistable class can be and the “Non-Object-Oriented” data model used to store the made persistent. objects [7]. This category of Object-Persistence methodology provides a kind of runtime mapping or translation between the 2.2 Persistence by Creation two models in a manner that is transparent to the programmer. An object can be transient or persistent. To make an object However, the application developer has to give more focus in persistent new syntax has been introduced; by extending the the process when non-trivial mappings between types in the syntax that used for creating transient objects. The object is models have to be stated explicitly. persistent or transient decided by its creation. This approach widely supports when programmers wants to 2.3 Persistence by Marking use existing non-Object-Oriented data stores but write A different approach compare to persistent by class and applications using Object-Oriented programming models[8]. creation. In this approach we mark an object as persistent after The data store schema that is used to store the persistent state object creation process. All objects are created as transient of the objects in the data store is different from the objects without any change in object creation, based on requirement; having a different model (object-oriented) for an application an identified object can be marked explicitly as persistent so the system which is adopting GOP approach performs a object. Marking should be done after object creation and mapping between both Object-Oriented schema and non- before program terminates. Object-Oriented data store schema [9]. During the execution time of application, the GOP system translates objects from 2.4 Persistence by Reachability the representation used in the data store to the representation In this approach selected objects are declared as persistent used in the application and vice versa. Table 1 explains the objects, often referred as root. All other objects, which are advantages and limitations of Gateway-Based Object- referred from this persistent object (root), directly or Persistence methodology. indirectly also becomes persistent object. In other words all The Object Management Group (OMG) develops the standard objects referenced or reachable from root persistent objects activities which are relevant to GOP. The most important are persistent. Advantage of this approach is to make specification OMG has adopted is CORBA (Common Object complete data structure persistent by merely declaring the root Request Broker Architecture). Other than CORBA, Persistent of this structure as persistent. However it is much expensive Object Service, Object Query Service, Object Relationships to follow the chains in detection for a database system. Service, Object Transaction Service, and Object Security In an execution environment several objects will be created Services are the specifications which are adopted by OMG and performing specified task. All objects in a system which directly relates to Object-Persistence. communicate to other objects. The system state is defined by Other than accessing and updating data in legacy databases, a considering all objects and the relationship among them. GOP application can also access other OODBMSs and even it Object pointers are used to express the relationship among can store complex data objects natively in them. But, there are objects in an Object-Oriented environment. “PersisentPtr” some issues and challenges with this feature and efforts are was introduced to keep track of the relationship between being carried out by the experts in resolving those issues. persistent object even after the program termination [12]. Integration of Object-Persistence with object query, object transaction and workflow, and object security are some of the 3 OBJECT PERSISTENCE issues which are related to GOP approach. TECHNIQUES – BENEFITS AND Table 1. Gateway-Based Object Persistence LIMITATIONS In recent development era, most of the application developers Benefits Limitations prefer Object-Oriented models for implementing advance  GOP provides Object-  It maps Object-Oriented applications and hence object oriented paradigm is globally Oriented access to legacy models blindly to non- adopted now. As most applications are developed using object applications as well as Object-Oriented databases oriented model, the usage of persistent data is also increasing non-Object-Oriented data. because it gives bad

20

International Journal of Computer Applications (0975 – 8887) Volume 85 – No 5, January 2014

Benefits Limitations those that have been implemented from scratch which include  Supports and manage performance and complex Illustra and UniSQL. The second categories of ORDBMS shared, distributed, application logic. applications are those that are implemented by extending the heterogeneous, and  Lacks in handling existing relational DBMSs which include DB2, Informix, language-neutral randomly and arbitrarily Oracle, and Sybase. persistent business complex objects in a Table 2. Object-Relational DBMS objects. legacy database system.  Helps to integrate Benefits Limitations enterprise information  Very effective in  Limited focus and only systems and provide a developing applications concentrate on data stored common framework for that requires extremely in relational databases or developing Object- good query support, whatever in the future can Oriented software excellent security, be stored in extended solutions. integrity, concurrency and relational databases.  Developing a common robustness, and high GOP application that transaction rates. legacy applications  It extends the applications continue to work on data and use of existing, that are also accessed by legacy data stored in newer applications. relational databases.  Developing solutions that  ORDBMS addresses the have an overwhelming mismatch and need to access legacy data performance issues while and heterogeneous data accessing relational data access, while allowing from an Object-Oriented legacy applications to programming language. continue to work on the legacy data. 3.2 Object-Oriented DBMSs (OODBMSs) The OODBMSs are normally referred as persistent There are many systems available which are evolved as the programming language systems as they have their core applications of GOP approach namely VisualAge C++ Data platform in Object-Oriented programming languages. Object- Access Builder, SMRC, ObjectStore Gateway, Persistence, Oriented DBMSs methodology is a top-down approach which UniSQL/M, Gemstone/Gateway and Subtleware/SQL. is characterized by being application or programming 3.1.1 Object-Relational DBMSs (ORDBMSs) language centric. Table 3 describes the advantage and limitations of Object-Oriented DBMSs. The Object-Relational DBMS persistence (ORDBMS) method is a bottom-up approach which is characterized by “Extended database” and “Persistent programming language” being data oriented. In most of the today’s database are the two available methods for creation of an Object- applications, the is very extensively used and Oriented database [4]. The functionality of extended database SQL is already considered as a global standard. ORDBMSs method is to add the concepts of object orientation to existing mainly supports for object oriented data modeling by Object-Oriented language. The functionality of persistent incorporating both the relational data model and the query programming languages method is to inherit the features of language. At the same time it retains the already successful existing Object-Oriented languages and to extend the features technology like SQL of a relational DBMS relatively intact. to deal with databases by adding persistence and collections technologies. This type of persistence methodology attempts to build on, or extend, the existing relational data model to work with The OODBMS provides an effective methodology to add objects. The RDBMS has a standard query language to persistence to objects so that they can be used in an Object- expand, implemented by successful vendors and it has been Oriented programming language (OOPL) like C++ or extremely successful in business related applications [7]. Smalltalk. RDBMS persistence depends on a persistence delegate, code that hides or abstracts the details of object and table while The Management Group (ODMG) maintaining table concurrency [13]. consortium which is formed of OODBMS vendors specifies the standard activities for OODBMSs. ODMG has specified By the extension of the SOL standard, the standards activities the ODMG-93 standard which defines an Object Definition are carried out on this area. X3H2 which is the American Language (ODL), an Object Query Language (OQL), C++ committee responsible for the specification of the SQL and Smalltalk language mappings to ODL and OQL. standard has been continuously working on object extensions to SQL. In the new draft of the SQL standard named SQL3, Object-Oriented DBMSs support for persistent objects from these object extensions have been included. Currently, the more than one programming language, advanced transaction SQL3 standard is an ongoing attempt to build standard models, schema evolution, distribution of data, versions and extensions to the query language and relational model. Table dynamic generation of new types. Among these features, few 2 lists the advantages and limitations of Object-Relational of them have less impact on the object orientation but still, DBMSs Persistence methodology. Object-Oriented DBMSs includes them in their systems and applications. Gemstone, Objectivity/DB, ObjectStore, Ontos, There are two different categories of ORDBMS applications O2, Itasca and Matisse are some of the Object-Oriented available. The first category of ORDBMS applications are DBMSs which are available.

21

International Journal of Computer Applications (0975 – 8887) Volume 85 – No 5, January 2014

Table 3. Object-Oriented DBMS Object-Persistence Approaches Object- Object- Benefits Limitations Gateway- Relational Oriented  OODBMS models allow  Object-Oriented Feature Based Object- Database Database excellent support for databases lacks in Persistence Management Managemen managing complex objects providing good query (GOP) System (OR t System and encapsulation, real-time facility as provided by DBMS) (OODBMS) systems that need to handle ORDBMSs. normal form large and complex  Object-Oriented data) applications would require an database is not much Composite Can be Starting to Supported object oriented approach efficient, the Objects supported provide using class [14]. transaction rates (grouping of using schema support libraries  Object-Oriented databases supported by it do not objects for mapping(how through a are very useful for yet approach the high copying, ever, there can combination of applications that need rates achieved by deleting, etc.) be limitations) triggers, excellent navigational relational databases on abstract data performance. standard transaction types, and  Object-Oriented model processing collection allows storing application benchmarks. types objects, e.g., presentation or Object Support Starting to Supported view objects. Identity limited by provide  An object-oriented based (OID) underlying support database provides seamless database through row persistence from a identification programming language point Encapsulation Supported at To be Supported of view. application supported (but broken  OODBMS provides but not at using abstract for queries) extensive support for the data database data types modeling features of one or (row objects more Object-Oriented will remain programming languages, un- which avoids mismatch encapsulated) issues. Relationships Can be Strong support Supported supported available using class using schema including libraries 4 APPLICATION CHARACTERISTICS mapping and referential AND REQUIREMENTS code integrity This section describes about the various Object-Oriented generation applications requirements, their usage, behavior and Method Supported as Supported Supported as characteristics. It also explains how these characteristics and overriding, in an OOPL (method in an OOPL requirements are implemented by different Object-Persistence overloading, dispatching is methodologies. On a broader perspective, we have classified and based on the the characteristics as data modeling, data access and data dynamic generic sharing characteristics. The below section discusses all these dispatching function model characteristics in detail. not the classical object 4.1 Data Modeling Characteristics model) A data model is a group of conceptual tools for describing Inheritance Can be To be Supported as data, data semantics, data relationships and consistency supported supported in an object constraints. The Object-Oriented data model extends the using schema (separate oriented representation of entities by adding basic object oriented mapping inheritance programmin elements such as encapsulation, methods and object identity. (however, hierarchies for g language there can be tables and (OOPL) Table 4. Data Modeling Characteristics [8] technical abstract data Object-Persistence Approaches limitations) types) Object- Object- Gateway- Relational Oriented The Object-Relational data model combines features of the Feature Based Object- Database Database Object-Oriented data model and the relational data model. Persistence Management Managemen The Object-Relational data model extends the relational data (GOP) System (OR t System model by providing a richer type system including object DBMS) (OODBMS) orientation and collection types. Complex Can be Supported by Supported Objects supported extensions to 4.1.1 Complex Object (objects using schema the relational A Complex object is something that can be viewed as a single containing mapping data model thing in the real world but it actually consists of many sub- non-first-

22

International Journal of Computer Applications (0975 – 8887) Volume 85 – No 5, January 2014 objects. These sub-objects are actually the attributes of the applications. It describes how sharing of data takes place complex object. between concurrent users, how crash recovery is performed, details about advanced transaction models like long There are two types of complex object. The first types of transactions, versioning and nested transactions. complex objects are unstructured, difficult to determine the structure and require a large amount of storage. Examples of 4.2.1 Crash Recovery this type of complex object include Binary Large Objects A GOP system does not provide a very strong support on (BLOB). The second types of complex objects have a clear crash recovery feature but, it is able to provide whatever structure and the sub-objects are said to be in a part-of support is available in the underlying data store. On the other relationship. For example, region objects are complex hand, ORDBMSs are strong in this area since these systems application objects that are frequently used in GIS extend relation DBMSs. OODBMS systems do provide applications. recovery support but it is not much robust in this area. 4.1.2 Composite Object Table 5. Data Sharing Characteristics [8] A composite object is a group of related objects that can be processed in a single transaction. In a composite object, fields Object-Persistence Approaches Object- that reference other objects can be used to manipulate the Object- Relational dependent objects at the same time as the original object. Gateway- Oriented Database With this, transactional safety can be assured, since either the Feature Based Object- Database Managemen entire transaction succeeds or if it fails the system state Persistence Management t System remains same as if the transaction never started. Table 4 (GOP) System (OR compares the three approaches under various data modeling (OODBMS) parameters. DBMS) Crash Recovery Strongly Supported 4.1.3 Object Identity recovery handled by the supported (degree of Object identity is normally implemented using a unique, backend data support varies system-generated Object ID called OID. The value of the OID store (cache is with is not visible to the external user, but is used by the system not recovered) individual internally in order to identify each object uniquely and to product) create and manage inter-object references. Even though there is a change in some or all of the values of variables or ACID Support limited Supported Supported definitions of methods over a period of time, an object retains transactions by the its identity. underlying data store 4.1.4 Encapsulation (cache An object hiding its attributes behind its operations is termed management as encapsulation. Encapsulation is most often achieved might cause through information hiding (not just data hiding), which is the complications) process of hiding all the secrets of an object that do not Security, Support Strongly Limited contribute to its essential characteristics [2]. views, and determined by supported support integrity the 4.1.5 Relationships underlying data The relationship between any two objects encompasses the store assumptions that each makes about the other, including what Advanced No support No support Supported in operations can be performed and what behavior results [2]. transaction some products 4.1.6 Method Overriding, Overloading and model Dynamic Dispatching In GOP systems, methods are not stored in the database and 4.2.2 ACID Transactions hence they are executed only using the object representation ACID stands for atomicity, consistency, isolation, and of the data. Where as in the case of ORDBMSs, both methods durability. GOP System provides limited support for ACID and data can be stored within the database and hence they are transactions since the object cache maintained at the able to dispatch methods on objects within the DBMS . application is loosely coupled to the DBMS. ORDBMSs In OODBMS systems, normally methods are executed at the support all the traditional lock types available in relational client environment and hence most systems do not store DBMS like tuple, page, and table locks. OODBMSs support methods in the database. the conventional type of ACID transactions and also they support various types of locking. The standard lock types are 4.1.7 Inheritance page locks and object locks which are also known as record Inheritance is one of the object oriented concept that when a locks in RDBMSs [8]. class of object is defined, any subclass that is defined can inherit the definitions of one or more general classes. The 4.2.3 Security, Views, and Integrity objective of arranging objects in a hierarchy of classes is to ORDBMSs guarantee that the entire application executes in share properties of the objects in a useful, economical and its own address space and it exhibits an effective security meaningful ways through inheritance [10]. mechanism by using the view mechanism. An OODBMS system allows clients to cache data for acceptable 4.2 Data Sharing Characteristics performance by using the page server concept. This section describes about how the various Object- Persistence methods provide data sharing support for

23

International Journal of Computer Applications (0975 – 8887) Volume 85 – No 5, January 2014

4.2.4 Advanced Transaction Models access to data, OODBMS systems makes use of operating GOP and ORDBMS approaches does not support advanced system support for page faulting. transaction model very well whereas OODBMSs approach Table 6. Data Access Characteristics [8] provides better support for advanced transaction model. Table 5 shows the comparisons among GOP, ORDBMS and Object-Persistence Approaches OODBMS methods with respect to data sharing Object- Object- characteristics. Gateway-Based Relational Oriented Feature Object- Database Database 4.3 Data Access Characteristics Persistence Management Management This section explains about different data access features that (GOP) System (OR System are exhibit from various Object-Persistence methodologies. It DBMS) (OODBMS) describes how application objects are created and stored, in Schema Limited Supported Supported what way it provides support for navigational and ad hoc evolution support query types of access to persistent data, how interaction takes (complete place between client and server and the support characteristics support might for schema evolution and integrity constraints. be difficult to provide) 4.3.1 Schema Evolution Persistent Supported Supported Supported There are two different phases involved in the Schema data (might not be (not (degree of evolution. The initial phase involves schema change and the creation and entirely transparent transparency second phase involves modification and development of the access transparent to since depends on existing data to their new representation based on the the application) application individual modified schema. always has to product) A GOP system provides a very limited support for schema take explicit evolution. In contrast, an ORDBMS system can provide a action) strong support for schema evolution of table definitions. An Triggers No support Strongly No support OODBMS system can also provide support for schema and supported evolution but since the data model is complex, the schema Integrity evolution in an OODBMS cannot be completely automated as constraints in case of a relational DBMS. Table 6 shows data access Navigation Can be Currently Supported comparisons among GOP, ORDBMS and OODBMS supported by supported by efficiently by methodologies. transparently joins (to be most products mapping object supported 4.3.2 Persistent Data Creation and Access accesses to efficiently Persistence feature can be added to an object by following any underlying using row of the two major methods; one method is by overloading the database identification new operator and the other method is by inheriting a common operations (pre- ) class whose definition and implementation part is provided by fetching/cachin the database system. g needed for good Accessing of persistence data can be made virtually performance) transparent to the application in all three Object-Persistence Ad hoc Supported Excellent Supported but methodologies. However, data updating is not transparent in a query using data store support with GOP system and hence the underlying application has to facility specific query (impedance limitations inform the GOP system whenever there is a change in the language (not mismatch object state. In an ORDBMS system, updates are performed integrated well remains an using a separate UPDATE statement and hence they are non- with object issue) transparent. The extent of transparency varies in the representation) OODBMS systems; in some cases, updates can be made Object Object server Object server Can be page completely transparent where as in others, updates needs to be server vs. server or explicitly specified by the application. page server object server 4.3.3 Triggers and Integrity Constraints A GOP system cannot provide support for triggers and 4.3.5 Ad-hoc Query Facility integrity constraints. An ORDBMS system can provide A GOP system normally does not implement a new query excellent support for and integrity constraints. OODBMSs language on the object representation. In this system, the cannot virtually provide support for triggers and integrity query works on the base data model which is non-Object- constraints. Oriented and fails to work well with the application object 4.3.4 Navigation model; this creates impedance mismatch problem [8]. In In GOP systems, navigation feature is supported by mapping contrast, an ORDBMS system supports queries in a most object accesses to the databases where the data is stored. In efficient manner and performs well with the optimization and case of OODBMS systems, the applications require fast index management. In an OODBMS system, the support of navigational access. For example, in an integrated circuit query language is an extension of the Object-Oriented application, the verification and routing requires fast access to programming language. component objects since it is an extremely CPU-intensive operation. In order to provide extremely fast navigational

24

International Journal of Computer Applications (0975 – 8887) Volume 85 – No 5, January 2014

4.3.6 Object Server Vs Page Server Informix early-times proprietary Java Object Interface, were In a normal client-server environment, both client and server important to deal with). need to work on the assigned loads or the tasks. Hence, a • Data store connection management – establishment, closing, database management system has to utilize the available transactions; persistent object lifecycle – creation, read, resources of client and the server in an efficient way. Queries update, and delete (CRUD) operations. are issued to an object server in order to request for a single • Mass creation of objects, data stores usage of them or their object or a group of objects. GOP and ORDBMSs systems attributes (e.g. search operations). In distributed object can be considered as object servers, where as an OODBMS environments, it is important to balance the load of database system can be both object and page server. ObjectStore and operations. O2 are few examples of page server architectures. 5.4 Object-Relational Impedance 5 EMERGING CHALLENGES Mismatch The Object-Oriented paradigm is efficient, capable and well 5.1 Close Language Binding known in application development. Object-orientation is There is a layer between database and the application using based on proven software engineering principles. However the the database for storage in the traditional relational systems. relational paradigm is based on proven mathematical Data is transient when it is available in application’s memory principles. Both are having different structure and because and persistent when it is stored in database. The application the underlying paradigms are different, the two technologies program often required to perform read and write operation on do not work together seamlessly. The impedance mismatch database elements. However this separation is not present on becomes clearly visible when we look at the preferred Object-Oriented database, application program manage approach to access; by using the object paradigm you traverse persistent as well transient data in similar way. In OODBMS objects via their relationships whereas with the relational any kind of data can be persistent and same methods can be paradigm we join the data rows of tables. This fundamental used to perform operations on persistent as well as transient difference in the structure results in a non-ideal combination data. Also, it offers the object to be retrieved identically of object and relational technologies. Following are regardless of location. There are various approaches to challenges of storing objects in relational database [16]. implement Object-Persistence (discussed above in section 2) and a best way to achieve this by using "persistence by • Mapping Object-Oriented classes to relational tables reachability" [15]. The language interface for OODBMS • Inheritance relationship and relational tables offers mechanisms to define and open databases, commit or • Mapping association in relational tables abort transactions, acquire locks, and accessing data within • Multiplicity, association class and link table database, and it does not require any additional overheads and • Mapping aggregation-composition and shared aggregation constructors. If an object has not been retrieved from the • Shared aggregation and reference table database yet, in such cases the program does not need to do 5.5 Transparency and Object-Fault any additional operations. The underlying database system Persistent of object should be independent of how application will automatically recognize the situation and retrieve the program modified and manipulates that object. Persistence object [15]. independence, also referred as transparency, requires that it is indistinguishable whether programming code is operating on 5.2 Unified Development Process persistent or transient data [10]. Persistence independence is Close language binding offers scalability and design achieved by combining the features of reachability-based flexibility that simplifies the lives of system analysts and identification with an object-faulting mechanism. The notion designers. The good point of Object-Oriented DBMS is that it of object fault [11] is similar to the notion of page fault in the supports object oriented language and applies the object- context of demand-paging virtual memory. orientation concept in database as well. Object-Oriented DBMS follows semantically same concept like Object- 5.6 Serialization Oriented modeling and design, Object-Oriented analysis, and Simple arrays and hashes can be represented and written on Object-Oriented languages allowing a unified conceptual file using commas, tabs, spaces or user defined format. approach during the whole development cycle. Unified Complex and nested data structures such as arrays of arrays or approach has big advantage that it simplifies development and arrays of hashes have to lower down or serialized before eases the communication between users, analysts, and writing into file. Also data items can be of global type and developers. However in Object-Relational DBMS, the may contain references to other data items or pointers to relational database objects have to be mapped to tables. This native “C” data structure. required some amount of time to create the relational tables and views, and it is also complicated to keep up the model 5.6.1 Object Storage Problem with changes in the physical implementation. All this leads In persistence by reachability mechanism, persistence can be complexity in applications as well as creates difficulty to defined as a network of persistent objects whose root is maintain the database. Object-Oriented database do not serializable. In other words, any object that a persistent object required semantic transformations as the same underlying can touch automatically becomes persistent and thus a object model is used during the whole development process. member of the network. In Java execution environment, This unified approach offers higher quality systems that are during storage time, all the objects are converted in the flexible, scalable and easier to maintain [15]. network to a byte stream for storage in a flat file. The restriction of serialization stem from the fact that an 5.3 High-Level Functional Requirements individual object cannot be modified and the entire network of In persistent Object-Oriented systems, following issues objects must be accessed as a whole. There is overhead that require critical attention [17]: each time a member of the object network is stored, the entire • The uniform interfaces need to be independent from data byte stream that contains all objects in the network has to be store type (JDBC, LDAP and some other interfaces, such as serialized and stored. The opposite procedure occurs each

25

International Journal of Computer Applications (0975 – 8887) Volume 85 – No 5, January 2014 time a persistent object is accessed. A multi-user enterprise communication. This serialized object can be read by application requires fundamental database capabilities, like unintended parties, or may be tampered and modified while in transaction and queries, however object serialization lacking transit. To prevent the data from being written when the in this area. In general we can say serialization is inadequate object is serialized; sensitive data, such as socket file for robust application development. However ODMG binding descriptors, or other handles to system resources, should be for Java provides a good alternative for persistent object made private as well transient. Also when the object is development with Java [18]. retrieved back from a stream, only the originating class can assign a value to the private data field. A validation method 5.7 Data Source Related Issues can also be used to check the integrity of a group of objects JDBC provides standard for communication between Java when they are retrieved from a stream. based application and relational database. Several frameworks have been designed with the focus on independence from data To avoid security problems, the efficient way is to encrypt the store type, however still JDBC-compliant data stores captured serialization stream, ensuring both privacy and integrity. To the popularity and most of attention and efforts. JDBC itself is achieve this, customized readObject and writeObject methods quite convenient and simple set of interfaces, the actual can be implemented, or can be achieved by using the implementations tend to deviate from the standard by Externalizable. For a global application, ObjectInputStream providing proprietary extensions in some cases or postponing and ObjectOutputStream class can be customized to encrypt certain important implementations like metadata until better the entire object stream [5]. times [17]. This resulted into tough job for balancing between proprietary vendor extensions usage and the complexity 5.12 Machine independence involved in encapsulating the differences into application During computation operation files are being created in abstractions. Metadata, mappings of SQL data types to JDBC different systems and on different type of machines. These data types, processing of BLOB/CLOB data and unique files are being used by other systems with different type of incremental Id’s were some of the concerns in this area. machines. This requires continuous tracking of differences in size and byte order of integer, and floating-point 5.8 Versioning Issues representation. Sometimes with change in application requirement, class definitions for all objects change over time, and that requires 6 CONCLUSION attention to deal with versioning objects. The serialization In this paper we have discussed the different Object- mechanism may have read in out dated objects, whose Persistence techniques, advantages and limitations of each of structure has been modified and different from current version these techniques. Our discussion continued further on the of the class it belongs to. The possible cases that may occur characteristics and requirements of applications; and how well should to be outlined and well defined in serialization these features are supported by major category of Object- specifications. A major change to an object, or changes in its Persistence techniques, such as GOP, ORDBMS and location in a hierarchy, requires the developers to manually OODBMS. Later we discussed more about the object convert the out-of-date objects, in some cases this can be persistent challenges. handled automatically or nearly so [5]. Gateway-based technique basically uses traditional non- Object-Oriented data stores, for example flat files, relational 5.9 Concurrency Control and hierarchical databases. Gateway-based is middleware In recent development, concurrency control becomes basic approach and very good for providing a common framework need for scalable applications, which allows multiple users to for building Object-Oriented applications and integrating access the data storage at the same time. Effective and diversified enterprise information systems. It offers excellent efficient concurrency control mechanism enables guaranteed support for managing shared, distributed, heterogeneous, and data integrity, and consistent information received by users. In language neutral persistent business objects. GOP is having real time execution environment, different applications or disadvantage that it blindly maps Object-Oriented models to users may want concurrent access to persistent data stores, non-Object-Oriented databases. It is most suitable for such as file or database. Few systems ignore concurrency applications that have critical need to access legacy and issue altogether; others offer different types of locking heterogeneous data; while allowing legacy applications to schemes. continue to work on legacy data. 5.10 Boundaries Object-Relational technique involves improving the relational Traditional and ordinary files are based on byte stream and data model by adding the Object-Oriented modeling features generally they do not provide any limitation and restriction on to it. Object-Relational technique is a bottom-up approach and boundaries. File users need to decide how to represent distinct very efficient for extending the usefulness of existing, legacy data item on file and make them recognizable on disk so that data stored in relational databases. It addresses the mismatch they can be retrieved easily. Indexed Sequential Access and performance issues while accessing relational data from Method (ISAM) and DBM systems are based on Record- an Object-Oriented programming language. Object-Relational Oriented structure and RDBMS provides record and column techniques have the best robustness, concurrency, and crash boundaries. It is always good to have well defined data recovery characteristics among all three Object-Persistence structure, slotted in grid structure else “impedance mismatch” methods. The major drawback of Object-Relational technique will occur. Latest solutions, such as OR-DBMS and OO- is that it concentrates only on data stored in relational DBMS, attempt to make this "restriction" or "failure" a non- databases or whatever in the future can be stored in extended issue. relational databases. Object-Relational is very effective technique in developing applications that requires extremely 5.11 Security Issues good query support, excellent security, integrity, concurrency Security is a big concern when a serialized object traveling and robustness, and high transaction rates. across the internet through sockets or network

26

International Journal of Computer Applications (0975 – 8887) Volume 85 – No 5, January 2014

Object-Oriented database adds persistence support to objects [5] Jim Coker, Object Persistence and Distribution, in an Object-Oriented programming language. Object- http://java.sun.com/developer/technicalArticles/RMI/Obj Oriented is a top-down approach and provides excellent ectPersist/index.html, Feb 1997. support for storing application objects, for example, presentation or view objects. Object-Oriented databases are [6] Scott W. Ambler, Impedance Mismatch, best for providing seamless persistence, from a programming http://www.agiledata.org /essays/ language point of view. The good point about Object-Oriented impedanceMismatch.html , 2005 databases is that it avoids the impedance mismatch by [7] Raffi Khatchadourian, Object Databases: an Analytical providing extensive support for the data modeling features. Approach, http://www.cse.ohio- On the negative side of Object-Oriented databases, it lacks in state.edu/~khatchad/reports/ khatchad-objdb.pdf, 2006 providing good query facility as provided by Object- Relational systems. OODBMS is suitable for applications that [8] V. Srinivasan and D. T Chang, "Object persistence in need excellent navigational performance, that do not have Object-Oriented applications, " IBM Systems Journal, complex query, and that are prepared to sacrifice some vol. 36, pp. 66–87, 1997 integrity and security for achieving good performance. [9] Patrik Hildenborg, Muhammad Irfan Tahir, Object Object-Oriented databases are being preferred in modern trend Persistence: Persistence approaches in object oriented as it offers close language binding, unified development environment, http://www.idt.mdh.se/kurser/cd5130/ process that helps developer a lot in development process. msl/2005lp4/downloads/reports/ object_persistence.pdf All persistence techniques, including GOP, ORDBMS, and [10] Ashrafuzzaman, M.; Kusalik, A.J., An implementation OODBMS are having both advantages as well as limitations, architecture for orthogonally persistent deductive Object- and they have their own positive and negative impact on Oriented database systems, Database Engineering and object data. Recent development trend shows that, all three Applications, 1999. IDEAS '99. International techniques are having some importance and they play major Symposium Proceedings roles for different application characteristics and requirements. Object-Oriented database satisfies the needs of [11] S. J. White and D. J. DeWitt. A performance study of specialized markets, so it is obvious to see the continued alternative object faulting and pointer swizzling presence of it. On the other side Object-Relational database strategies. In L.-Y. Yuan, editor, International fulfill the needs of traditional commercial markets; Gateway- Conference on Very Large Databases, number 18, based technique combined with object query, object pages 419–431, Vancouver, Canada, August 23-27, transaction and workflow, and object security, hence its 1992. importance and existence is keep increasing. Effective and [12] Vogelsang, H.; Brinkschulte, U.; Stormanolakis, efficient persistence technique selection is an important factor M.;,Archiving system states by persistent objects, and it clearly depends upon the application characteristics and Engineering of Computer-Based Systems, 1996. requirements. Based on requirements, an application developer can choose best suitable Object-Persistence [13] Richard T. Baldwin,"Views, Objects, and Persistence for technique for storing objects. Every Object-Persistence Accessing a High Volume Global Data Set", Proceedings technique has some associated challenges in it; there has been 20th IEEE/11th NASA Goddard Conference on Mass a continuous effort carried out in addressing those challenges Storage Systems and Technologies, 2003 , Page(s): 77 - and already many solutions exists in the object storage field. 81 7 REFERENCES [14] Juhnyoung Lee, Sang H. Son, Myung-Joon Lee, Issues in [1] Clarence J M Tauro, N Ganesan, Ritesh Kumar Sahai Developing Object-Oriented Database Systems for Real- and Sandhya Rani A., Comparative Study on Object Time Applications, Proceedings of the IEEE Workshop Persistence Methods. International Journal of Computer on Real-Time Applications, 1994. On page(s): 136 - 140 Applications 42(7):17-, March 2012. Published by [15] Richard G. Gibson, Object Oriented Technologies: Foundation of Computer Science, New York, USA Opportunities and Challenges, Idea Group Publishing, [2] C. Booch, Object-Oriented Analysis and Design with 1999, Page: 47 Applications, second edition, The Benjamin/Cummings [16] Bhuvan Unhelkar, Practical Object Oriented Design, Publishing Company, Redwood City, CA (1994). Thomson Social Press, 2005 [3] Matt Weisfeld, The Object-Oriented Thought Process, [17] Adomas Svirskas, Jurgita Sakalauskaite, An Approach Third Edition 3ed.Sep.2008 for Solving Java Object Persistence Issues using RDBMS [4] Silberschatz−Korth−Sudarshan: Database System and other Data Sources. Concepts, Fourth Edition, 2001 [18] Douglas Barry, Solving the Java Object Storage Problem, 0018-9162/1998 IEEE

IJCATM : www.ijcaonline.org 27