Loading...
Posts on the
Design Decomposition Blog
Iridium Satellite Collision in Space
You might have seen the recent news reports about the collision between U.S. and Russian communication satellites. The U.S. satellite was one of the Iridium satellites. What wasn’t reported and you probably don’t know is that an object database management system (ODBMS) is an important part of the Iridium system. Even though ODBMSs are a [...]
February 13, 2009
(The Acronym) SOA is (Perhaps) Dead (at Some Companies); Long Live Services
I am now also posting on the Cutter Blog. My initial posting is (The Acronym) SOA is (Perhaps) Dead (at Some Companies); Long Live Services. It is a response to Anne Thomas Manes’ SOA is Dead; Long Live Services on her blog at the Burton Group.
January 9, 2009
Atomicity
The typical definition of an atomic task or process is one that cannot be decomposed further. This is vague and subject to interpretation. The Decomposition Matrix on this site uses a specific definition: A task (for business process diagrams) or a process (for data flow diagrams) is atomic if every input relates to every output [...]
December 3, 2008
Well-Formed Business Process Diagrams
My last posting referenced the criteria for a well-formed business process diagram mentioned in Business Process Driven SOA using BPMN and BPEL by Matjaz B. Juric and Kapil Pant. I am going to expand on their criteria to create a more comprehensive definition of a well-formed business process diagram. To start, here are three criteria [...]
November 18, 2008
Recent Business Process Modeling Books
I recently received two new books on business process modeling. Both books looked interesting because they had great titles. As it turns out, one book is great and the other not so good. The not so good book is Business Process Driven SOA using BPMN and BPEL by Matjaz B. Juric and Kapil Pant. There [...]
October 9, 2008
The Design Decomposition Blog
is written by Doug Barry.
Loading...

This example uses the ODMG Java Binding and the ODMG Object Query Language (OQL). Other query languages for object-relational mapping products would be similar. Notice that all the code is Java, with the exception of the query string. You will not find a database sub-language in this example. The part in blue relates to the animation of transparent persistence (new window). More information on the ODMG specification (new window). Note that the same code would used for object databases (new window). Transparent persistent interfaces work with both object database or object-relational mapping products.

import org.odmg.*;
import java.util.Collection;
Implementation impl = new com.vendor.odmg.Implementation();
Database db = impl.newDatabase();
Transaction txn = impl.newTransaction();
try {
    db.open("addressDB", Database.OPEN_READ_WRITE);
    txn.begin();
    // perform query
    OQLQuery query = new OQLQuery(
       "select x from Person x where x.name = \"Doug Barry\"");
    Collection result = (Collection) query.execute();
    Iterator iter = result.iterator();
    // iterate over the results
    while ( iter.hasNext() )
    {
        Person person = (Person) iter.next();
        // do some addition processing on the person (not shown)
        // now traverse to the address object and update its value
        person.address.street = "13504 4th Avenue South";
    }
    txn.commit();
    db.close();
}
//exception handling would go here ...

Related content for: Java and object-relational mapping

More on the general topic: How to access data in a relational database

Read more free articles on this site

There are nearly 400 pages of articles on this site with over 50 pages on object-relational mapping.

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. You can see more detail by clicking on the arrows. This highlights the location of the current article: Java and object-relational mapping.

Loading...

Related recent articles from Google News

Ruby on Rails 3.0 now available
Reuters
A new Active Model framework allows ORM (object-relational mapping) like Mongoid to use Active Record validation, callbacks, and serialization. ...
and more »
30 Aug 2010 at 9:02pm
Jolt Product Excellence Awards: App Libraries and Frameworks
Dr. Dobb's
Telerik rounds the package out with additional libraries for report generation, object relational mapping, and code analysis. There's the usual array of ...
Jolt Awards: And the Round 2 Winners Are... Dr. Dobb's (blog)
all 4 news articles »
1 Sep 2010 at 8:54am
Cover Story: Get Ready for the Entity Framework
Redmond Developer News
... positioned for enterprise-level projects with a host of new functionality that brings it more in line with other object-relational mapping (ORM) tools. ...
and more »
31 Aug 2010 at 5:43pm
Cover Story: Get Ready for the Entity Framework
Visual Studio Magazine
... positioned for enterprise-level projects with a host of new functionality that brings it more in line with other object-relational mapping (ORM) tools. ...
and more »
30 Aug 2010 at 10:45am
Tasktop Names Neelan Choksi President and COO
PR Newswire (press release)
Before joining SpringSource, Choksi served as co-founder and president of SolarMetric, a leading object relational mapping provider, which was acquired by ...
and more »
9 Aug 2010 at 8:03am
More related news on: "object-relational mapping"

Related books at Amazon.com

Data Structures and Algorithms in Java
Data Structures and Algorithms in Java
by Michael T. Goodrich, Roberto Tamassia
Average Customer Review: 2.5 stars based on 38 reviews.
Customer Review: Data Sturctures and Algorithms in Java is a great book for a Data Structure class for CS student. I go to a school where data structures is taught in C++. But i used this book to learn about most data structures. The explanations are very clear and detailed. I did not use the source code from this book as i had to program in C++ , h...
Data Structures and Abstractions with Java (2nd Edition)
Data Structures and Abstractions with Java (2nd Edition)
by Frank Carrano
Average Customer Review: 3 stars based on 9 reviews.
Customer Review: The condition was better than I expected. It was almost like brand new book!
Data Structures: Abstraction and Design Using Java
Data Structures: Abstraction and Design Using Java
by Elliot B. Koffman, Paul A. T. Wolfgang
Average Customer Review: 4 stars based on 5 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...
More related books: Search Amazon.com for object-relational mapping