Newletter Sign Up
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 from [...]
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 are [...]
October 9, 2008
The Design Decomposition Blog
is written by Doug Barry.

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.

Related recent articles from Google News

Firms expected to outsource business data management this year
Market Scan (blog)
... companies are expected to make greater use of advanced management practices, tools and technologies such as object relational mapping and cloud computing.
and more »
17 Mar 2010 at 3:45am
Terracotta Upgrades Ehcache
InformationWeek
Ehcache can also now serve as a caching system for Apache's object-relational mapping system, Hibernate, speeding up its operations. ...

15 Mar 2010 at 8:29am
Browsing Database Artifacts Using Data Source Explorer
SYS-CON Media (press release)
Generate Object Relational Mappings and Test with EJBQL Oracle Enterprise Pack for Eclipse provides a powerful and flexible object relational mapping ...

4 Mar 2010 at 2:52pm
Open Source Delivers Enterprise-Class Website on Shoestring Budget
CIO
... web services, validation, testing, security, transaction management, and coupled with Hibernate, the Object Relational Mapping (ORM) frameworks. ...

17 Mar 2010 at 2:29pm
Even with its success, .NET causes some consternation
SDTimes.com
The Entity Framework is a broader object-relational mapping framework for .NET. Microsoft denied that internal politics played a role in its decision to ...

10 Mar 2010 at 8:53am
More related news on: "object-relational mapping"

Related books at Amazon.com

Hibernate Made Easy: Simplified Data Persistence with Hibernate and JPA (Java Persistence API) Annotations
Hibernate Made Easy: Simplified Data Persistence with Hibernate and JPA (Java Persistence API) Annotations
by Cameron Wallace McKenzie, Kerri Sheehan
Average Customer Review: 4.5 stars based on 43 reviews.
Customer Review: This book is exactly what the title states. It makes hibernate easy. It does not delve into more advanced topics, but that is left for other hiber books. I 1st read Java Persistence with Hibernate and it was too much for me, and I was not able to find another book that did not use xml for configuring hibernate (other than the .cfg.x...
Data Structures and Algorithms in Java (2nd Edition)
Data Structures and Algorithms in Java (2nd Edition)
by Robert Lafore
Average Customer Review: 4.5 stars based on 24 reviews.
Customer Review: This guy does a great job of balancing tech with down to earth understanding. I used this book in my second tier programming class (OOP data structures) and it was the first book that I could really dive into, read his text and then take the code apart and understand it. He has very nice code examples.
Data Structures in Java: From Abstract Data Types to the Java Collections Framework
Data Structures in Java: From Abstract Data Types to the Java Collections Framework
by Simon Gray
Average Customer Review: 3 stars based on 1 review.
Customer Review: The book is in fine condition, however it took quite a long time to arrive. When it did arrive, it was wrapped in paper that was barely holding on to the book, and it looked like it encountered some hardships on its journey.
Data Structures and Other Objects Using Java (3rd Edition)
Data Structures and Other Objects Using Java (3rd Edition)
by Michael Main
Average Customer Review: 3.5 stars based on 15 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...
Schaum's Outline of Data Structures with Java, 2ed (Schaum's Outline Series)
Schaum's Outline of Data Structures with Java, 2ed (Schaum's Outline Series)
by John Hubbard
Publisher: McGraw-Hill
Publication Date: May 2009
More related books: Search Amazon.com for object-relational mapping