As we'll see in this article, evidence suggests that simple Java persistence will likely stem from the language itself, while sophisticated database functionality will be offered by database vendors.
In the real world, you rarely find an object that lacks relations to other objects. Objects are components of object models. The issue of object durability transcends the issue of object model durability and distribution once we make the observation that objects are interconnected by virtue of their relations to one another.
The relational approach to data storage tends to aggregate data by type. Rows in a table represent the physical aggregate of objects of the same type on disk. The relationships among objects are then represented by keys that are shared across many tables. Although through database organization, relational databases sometimes allow tables that are likely to be used together to be co-located (or clustered) in the same logical partition, such as a database segment, they have no mechanism to store object relationships in the database. Hence, in order to construct an object model, these relationships are constructed from the existing keys at run time in a process referred to as table joins. This is the same well-known property of the relational databases called data independence. Nearly all variants of object databases offer some mechanism to enhance the performance of a system that involves complex object relationships over traditional relational databases.
In storing objects on disk, we are faced with the choice of co-locating related objects to better accommodate navigational
access, or to store objects in table-like collections that aggregate objects by type to facilitate predicate-based access
(queries), or both. The co-location of objects in persistent storage is an area where relational and object-oriented databases
widely differ. The choice of the query language is another area of consideration. Structured Query Language (SQL) and extensions
of it have provided relational systems with a predicate-based access mechanism. Object Query Language (OQL) is an object variant
of SQL, standardized by ODMG, but support for this language is currently scant. Polymorphic methods offer unprecedented elegance
in constructing a semantic query for a collection of objects. For example, imagine a polymorphic behavior for acccount called isInGoodStanding. It may return the Boolean true for all accounts in good standing, and false otherwise. Now imagine the elegance of querying
the collection of accounts, where inGoodStanding is implemented differently based on business rules, for all accounts in good standing. It may look something like:
Rick wrote this book way before Java was en vogue and has an excellent treatment of various styles of object storage, from API to distribution to actual disk layout. Rick has gone on to play a important role in the definition of JDBC API.
This book is a collection of papers written on data storage, but has a bias toward demonstrating that object/relational systems will win out over pure object systems. Nonetheless, most anyone who is someone in this business has contributed to this book, so it's worth a look.