David Wallace Croft
Senior Intelligent Systems Engineer
Special Projects Division,
Information Technology
Analytic Services, Inc. (ANSER)
croftd@nexos.anser.org
1999-01-24
One of the ODBMS vendors which supports the ODMG standard, including server-side OQL processing, is POET. The current POET software will be used as the implementation example throughout this work.
With Java 2, a further abstraction of the classes has been made by introducing new interfaces such as Collection, Iterator, List, Map, and Set. The Java 1 classes have been retrofitted to implement these interfaces thereby allowing better support for programming through polymorphism and compositon. In addition, the java.util package has been supplemented by new concrete classes such as HashSet and LinkedList.
The ODMG 2.1 standard introduces new collections interfaces which extend their Java 2 counterparts, providing additional methods such as set operations (union, intersection, difference). Portability using the ODMG 2.0 standard may be implemented using custom adapter classes.
| ODMG Interface | Extends... | Description |
|---|---|---|
| DCollection | java.util.Collection | superclass to add/remove objects |
| DSet | DCollection, java.util.Set | unordered, no duplicates |
| DBag | DCollection | unordered, duplicates |
| DList | DCollection, java.util.List | ordered, variable size |
| DArray | DCollection, java.util.List | ordered, fixed size |
Usually such root objects are collections objects that are stored and retrieved from the database using a name unique to the database that is assigned and bound by the application. Such named objects are retrieved within the scope of a Transaction and from thereon object manipulations of the object and all objects reachable through its object graph are performed through the normal Java object operations such as accessor and mutator method calling. Changes to the object graph are committed using methods on the Transaction object such as commit() and checkpoint(). In addition, Transactions may be aborted leaving the persistent version of the object unchanged despite multiple manipulations to the transient representation.
As modifications to persistent objects are only reflected within the database when Transactions are committed, care must be taken to define the locking level to permit simultaneous shared access by multiple threads. Examples of locking attributes include read-only, read-write, and others. Vendor-specific implementations will offer additional locking granularity and strategies.
classes which manipulate object persistence must also be preprocessed unbind removes name, but object still exists
index search on server, not client
configuration file declares which classes persistent preprocessor uses ptjavac.opt dictionary file database file ODBC Driver SQL Object Factory classes can change over time without breaking the database student level available? POET Navajo: pure Java, automated persistent garbage collection
http://www.alumni.caltech.edu/~croft/research/java/odmg/
David Wallace Croft,
croftd@nexos.anser.org
© 1999 Analytic Services, Inc. (ANSER)
Posted 1999-01-24.