This document describes the application programming interface to the functionality provided by the ObjectStore object-oriented database management system. ObjectStore seamlessly integrates the C and C++ programming language with the database services required by complex, data-intensive applications. These services include support for the following:
Persistence
Provision of a central repository for information that persists beyond the lifetime of the process that recorded it Query processing
Support for associative data retrieval, such as lookup by name or ID number Integrity control
Services that maintain data consistency based on specified database constraints Access control
Services that protect data against unauthorized access Concurrency control
Services that allow shared, concurrent data access Fault tolerance
Services that protect data consistency and prevent data corruption even in the face of system crashes or network failures Dynamic schema access
Services that allow the programmatic manipulation of database schema information Schema evolution
Services that support schema change and automatic modification of database objects to conform to new schemas Data compaction
Services that support data reorganization to eliminate fragmentation ObjectStore Database Services
This section summarizes the functionality of each ObjectStore database service. Persistence
ObjectStore provides direct, transparent access to persistent data from within C++ programs. No explicit database reads or writes are required, and persistence is entirely orthogonal to type. This means that the same type can have both persistent and nonpersistent instances, and the same function can take both persistent and nonpersistent arguments. Moreover, the instances of any built-in C++ type can be designated as persistent. Query processing
Many application types require two forms of data access: navigational access and associative access. Navigation accesses data by following pointers contained in data structure fields. In C++, the data member access syntax supports navigational data access. Associative access, on the other hand, is the lookup of those data structures whose field values satisfy a certain condition (for example, lookup of an object by name or ID number). ObjectStore supports associative access, or query, through member functions in the ObjectStore Class Library. Integrity control
Many design applications create and manipulate large amounts of complex persistent data. Frequently, this data is jointly accessed by a set of cooperative applications, each of which carries the data through some well-defined transformation. Because the data is shared, and because it is more permanent and more valuable than any particular run of an application, maintaining the data's integrity becomes a major concern and requires special database support. Access control
ObjectStore provides two general approaches to database access control. With one approach, you can set read and write permissions for various categories of users, at various granularities. With the other approach, you can require that applications supply a key in order to access a particular database. ObjectStore also supports Server authentication services. Concurrency control
The concurrency control scheme employed by ObjectStore is based on transactions with two-phase locking. Locking is automatic and completely transparent to the user. The act of reading (or writing) an object causes a read (write) lock to be acquired for the object, so there is no need to insert any special locking commands into the application code. Locking information is cached on both client and Server, to minimize the need for network communication when the same process performs consecutive transactions on the same data. Fault tolerance
ObjectStore's fault tolerance is based on transactions and logging. Fault tolerance endows transactions with a number of important properties. Either all of a transaction's changes to persistent memory are made successfully, or none are made at all. If a failure occurs in the middle of a transaction, none of its database updates is made. In addition, a transaction is not considered to have completed successfully until all its changes are recorded safely on stable storage. Once a transaction commits, failures such as server crashes or network failures cannot erase the transaction's changes. Dynamic schema access
ObjectStore's metaobject protocol supports access to ObjectStore schema information, stored in the form of objects that represent C++ types. These objects are actually instances of ObjectStore metatypes, so called because they are types whose instances represent types. Schema information is also represented with the help of various auxiliary classes that are not in the metatype hierarchy, such as ones whose instances represent data members and member functions. The metaobject protocol supports run-time read access to ObjectStore schemas, as well as dynamic type creation and schema modification. Schema evolution
The term schema evolution refers to the changes undergone by a database's schema during the course of the database's existence. It refers especially to schema changes that potentially require changing the representation of objects already stored in the database. Data compaction
ObjectStore databases consist of segments containing persistent data. As persistent objects are allocated and deallocated in a segment, internal fragmentation in the segment can increase because of the presence of holes produced by deallocation. Of course, the ObjectStore allocation algorithms recycle deleted storage when objects are allocated, but there might nevertheless be a need to compact persistent data by squeezing out the deleted space. Such compaction frees persistent storage space so that it can be used by other segments.
Updated: 03/31/98 17:25:04