Java Data Objects (JDO)

The Java Data Objects (JDO) specification is part of the Sun Java Community Process. JDO is a Java application program interface (API) for transparent persistence. It works with both object and relational databases as well as other types of systems. It is designed to also work well with EJB and J2EE.

The JDO object model is determined by a set of Java classes and XML metadata file. The metadata file contains modeling directives that either override the semantics specified in Java or provides semantics that cannot be expressed in Java. An enhancer is provided that enhances the Java classes based on these modeling directives.

The JDO specification provides a standard interface for accessing, storing, and processing persistent objects. The primary aspects in the JDO model are: 

bulletPersistenceManager: PersistenceManagers negotiate accesses, transactions, and queries between applications and the underlying data store. More on the JDO PersistenceManager (new window).
bulletTransaction: Transactions provide for atomic, consistent, isolated, and durable management of data (ACID properties). More on ACID properties (new window).
bulletQuery: The JDO Query Language (JDOQL) allows users to search for persistent objects matching specific criteria. JDOQL is meant to be query language neutral so that the underlying query language could be SQL, an object database query language such as OQL, or a specialize API to a hierarchical database or EIS system. More on the JDO Query Language (new window).
bulletPersistenceCapable classes: The actual entities that are stored and fetched. There are three identity models to allow for different underlying database management systems. More on JDO identity models (new window).

The JDO specification uses the Java  language as much as possible, which allows the transparent integration of Java. This is illustrated by the following diagram and contrasts with the database sublanguage of SQL and its variants. In this diagram, you only see the host programming language and no database sublanguage or call-level interface as in JDBC.

Transparent integration of programming languages and database access

An example of a host statement in Java that creates a new Person instance would be:

person = new Person();
person.ssan = "999999999";
person.name = "Doug Barry";

This code fragment would be all the code necessary to create a new person. There is no database sublanguage or call interface. If you wanted to manipulate this object in Java, you could use the object directly. Also see transparent persistence vs. JDBC call-level interface (new window).

For more information on transparent persistence, see:

bulletTransparent persistence for object databases (new window)
bulletTransparent persistence for relational databases using object-relational mapping products (new window)

For examples of JDO code, see

bulletJDO and object databases (new window)
bulletJDO and object-relational mapping (new window)

For an architectural example of how JDO can be used, see using JDO with application servers (new window).

For more details, see the JDO Specification Sun site (new window).

Related content for: Java Data Objects (JDO)

More detail for the current topic: Java Data Objects (JDO)
JDO PersistenceManager
JDO identity models
JDO Query Language (JDOQL)

More on the general topic: DBMS standards
SQL-92
JDBC
SQLJ
SQL:1999
ADO.NET
ODMG 3.0
Detailed comparison of ODMG 3.0 and JDO
Summary comparison of DBMS standards

Read more free articles on this site

There are nearly 400 pages of articles on this site with over 40 pages on database concepts and standards.

Search this site for more articles

Custom Search

Browse this site for more articles

Click on the topics below to browse the articles on this site.The arrows show the path to the current article: Java Data Objects (JDO).

Web Services and Service-Oriented Architectures
Online briefings
Search results
Online articles -->
Consulting
Mentoring
Speaking
Stencils for the Savvy Manager's Guide
Links
Mail list
Privacy policy
Sitemap
Contact
Web Services articles
XML standards and vocabularies
Application server articles
Database concepts and standards -->
Object database articles
Relational database articles
Object-relational mapping articles
XML database articles
XML middleware articles
Article Sponsorship
Reprint policy
Basic concepts for using a DBMS
Database models
DBMS standards -->
Article suggestions
SQL-92
JDBC
SQLJ
SQL:1999
ADO.NET
Java Data Objects (JDO)
ODMG 3.0
Detailed comparison of ODMG 3.0 and JDO
Summary comparison of DBMS standards

Related books at Amazon.com


Object-oriented Data Structures Using Java
by Nell B. Dale
Average Customer Review: 4 stars based on 5 reviews.
Customer Review: This seller was very punctual with the shipping and delivery of the book and it was in very good condition like the ad had stipulated. I will recomment him to anyone ST

Objects, Abstraction, Data Structures and Design: Using Java version 5.0
by Elliot B. Koffman, Paul A. T. Wolfgang
Average Customer Review: 4.5 stars based on 3 reviews.
Customer Review: A reader wrote that, "this book fails to address concurrency issues". But the books title never commits this. It's about teaching data-structures using Java (correctly). And it exactly does this with great success. Although I read it to refresh my knowledge, I enjoyed a lot as I learn the subject first time. It's CS for beginners, bu...

Data Structures and Other Objects Using Java (3rd Edition)
by Michael Main
Average Customer Review: 3.5 stars based on 14 reviews.
Customer Review: Even after taking a mid-level CS course where this book was the required text, this book still sits on my bookshelf at work for reference. Why? Well, certainly it is not the most comprehensive book of data structures in existence, nor is it written with a scholarly tone. But, that's the point! Michael Main's writing has the air of a...

Data Structures and Algorithms with Object-Oriented Design Patterns in Java (Worldwide Series in Computer Science)
by Bruno R. Preiss
Average Customer Review: 2.5 stars based on 10 reviews.
Customer Review: Hi, as an undergrad engineering student, I had this book for the coursebook in my algorithms course. Honestly speaking, it's good , very readable text. I never used any of the code examples fom the book in my assignments, yet they proved rather helpfull in understanding the material. Something, that I think is missing from this book...

Java Data Objects
by David Jordan, Craig Russell
Average Customer Review: 3.5 stars based on 11 reviews.
Customer Review: This book is definitely the best on java data objects! i have read the one from prentice hall and addison wesley`s. its true that the first code example doesnt work, what is a shame but if you overcome your frustration and have a look at the oreilly website you can fond the correct and again detailed information (and even reason) to...

More related books: Search Amazon.com for "Java Data Objects"

 

Copyright © 2000-2009 Barry & Associates, Inc. All Rights Reserved.
You can use this material for your work or classes. Click here for our reprint policy.
www.service-architecture.com

 

 

Newletter Sign Up

 

 

Barry & Associates, Inc.