The Java community needs a standard way to store Java objects
persistently in transactional data stores. Furthermore, it needs a
standard way to treat relational database data as Java objects, and
a standard way to define transactional semantics associated with
those objects.
The
Java Data Objects (JDO) specification
provides for interface-based definitions of data stores and
transactions; and selection and transformation of persistent storage
data into native Java programming language objects.
Figure illustrates
The JDO Enhancement Process
JDO is designed to work on all Java platforms. All Java platforms - desktop,
server, personal, embedded, and card - can use this API to access
data.
Existing specifications for persistence include JDBC, SQLJ, and
java.util.Serializable. The JDBC and SQLJ mechanisms provide for
query, transactions, and large capacity storage, but require that
users learn another language (SQL). JDO allows users to specify
their application program logic, including queries, entirely in
Java, and express the mapping, if any, to the database with a
separate mechanism. The java.util serialization protocol provides
for persistence, but it does not offer query capability,
transactional behavior, nor large capacity data storage. In
addition, both the serialization and SQL APIs require that the
programmer explicitly fetch and store Java objects from a database;
JDO proposes Transparent
Persistence, doing this automatically.
JDO is therefore, a high level API that may be implemented using lower level
APIs like JDBC or SQLJ PART 0 to store data. This specification
provides for interface-based definition of data stores,
transactions, selection, and transformation of persistent storage
data into native Java objects. There are several major parts of the
specification:
the semantics of persistence with
regard to transactions;
the mapping (default and
user-specified) of data types between data stores and Java objects;
the interactions of transactional
objects with Enterprise Java Beans bean- and container-managed
persistence;
the selection of objects from the data
store based on Java expressions.