Detailed Comparison of ODMG 3.0 and JDO
This table shows a summary of the similarities and differences between the two approaches to transparent persistence: ODMG 3.0 and JDO. It is from a presentation at JavaOne by Heiko Bobzin of POET Software.
ODMG 3.0 | JDO |
---|---|
Object Model | |
Transparent Persistence | Transparent Persistence |
Persistence by Reachability | Persistence by Reachability |
Java, C++, and Smalltalk Language Bindings on top of ODMG object model | Tight integration with Java object model |
Vendor specific interfaces | PersistenceCapable interface |
Collection factory for five basic collections | Collection factory “by Example”, Second Class Objects |
Object identity managed by database system | Three identity models (more on identiy models) |
Life Cycle | |
Objects live until transaction completes | Objects can live as long as PersistenceManager (more on persistence manager) |
Objects can not be accessed after transaction completes | API allows the setting of properties |
Callbacks not defined | Callbacks for load, store, delete, and clear |
Databases and Transactions | |
Easy to use but proprietary database and transaction management | Databases, connections and transactions fit into other Java APIs |
No distributed transactions defined | Support for distributed transactions |
Vendor specific extensions for managed environments (EJB) | Support for managed environments (EJB) |
Vendor specific extension for optimistic locking | Optimistic locking is optional API |
Explicit locking of objects | No explicit locking -- locks set automatically |
Query | |
OQL: an extensive object query language | Queries based on Java programming language — JDOQL (more on JDOQL) |
Complex query expressions | Simple filter strings |
Results can be compositions, projections or just an integer | Results are always collections of persistence capable objects |
Class name is part of query string | Class objects explicitly used as parameters |
No imports or name scope | Imports, "this", named parameters |
This table, copyright ? 2001 FastObjects by Poet, used with permission.
For more information on transparent persistence, see:
- Transparent persistence for object databases
- Transparent persistence for relational databases using object-relational mapping products
For more information on ODMG 3.0 and JDO as well as other database specifications, see the related content below.
Related Articles
More on the general topic: DBMS Standards
- SQL-92
- JDBC
- SQLJ
- SQL:1999
- ADO.NET
- Java Data Objects (JDO)
- ODMG 3.0
- Summary Comparison of DBMS Standards