By Doug Barry
DB Prog, & Design -April 1998
Sun Microsystems’ Java Blend object storage middleware and Computer Associates’ Jasmine object database both support the ODMG 2.0 object storage API.
Welcome to my inaugural ODMG column!
Pop quiz: what do Microsoft, NEC, Hitachi, Lockheed Martin, Computer Associates and Sybase have in common? Answer: they are all participants in the Object Database Management Group (ODMG).
Why are these companies involved with the ODMG? What is the ODMG and why should you care about it? In a series of articles that I’ll be contributing to this space, I’ll answer these and other questions centered on the issue of object storage in databases.
But before I go too much further, I need to tell you at least this much: I believe that there is an ODMG database in your future. Why? Because ODMG is the only standard interface that allows developers to store Java objects directly using a standard API that is completely database independent. It doesn’t matter whether the underlying storage mechanism is a relational or an object database. If it has an interface that speaks ODMG, you can store objects directly using the standard API.
The other thing you need to know, before we get started, is a little bit about who I am. I’ve been in the database business for over twenty-five years, and I got started with object databases in 1987 when I worked for Control Data Corporation as a liaison to Microelectronics and Computer Technology Corporation (MCC) in Austin, Texas during the development of the ORION object database management system project. I was a co-founder of Itasca Systems, Inc. where I led the technical development of ORION into the commercial product ITASCA.
After I left Itasca Systems in 1992, I started my own consulting practice, Barry and Associates, Inc. My specialty is strategic object database decision-making. I work with clients to determine whether or not an object database is an appropriate technical choice for their application. Assuming that it is, I assist my clients in determining which product is the right fit for them. My goal is to bring an insider’s perspective – the good, the bad and the ugly – to my clients in an unbiased fashion. I have also been the Executive Director of the ODMG since 1993, and I have written and edited several books on the subject of object databases that focus on both the big picture and the nitty-gritty of specific product selection. So in summary, I have been working inside the object database business from the beginning, and in the database business as a whole for even longer. My goal for this column is to translate that experience into giving you my unvarnished view of the ODMG standard and the issues around object storage.
By the way, I’m not an object database zealot: I see plenty of applications where relational databases are the perfect solution. But I can also tell you that there are emerging classes of applications, largely driven by Java and the Web, where direct object storage, whether to a relational or an object database, is a clearly superior solution. That’s why I started out by stating that sooner or later, you’ll end up using an ODMG-compliant database.
The reality is that the meteoric growth of the Web has profoundly changed our view of applications. We want new applications that give people both inside and outside of our companies access to our data. And we want these new applications to give users the flexibility and dynamism that they have come to associate with the Web. One practical way to create these new data-rich applications is to use object-oriented technology like Java.
The industry standard for Java object storage is ODMG 2.0. Its well-supported API enables you to store your Java application objects directly, without mapping code and its associated performance overhead. While the ODMG specification originally started out as a standard API for object databases, it has evolved into an API for object storage, so don’t be deceived by the name.
OK. Time for another pop quiz. This one’s a two part question: A) Jasmine is Computer Associates’ brand new, next-generation object database for Internet and Intranet applications. What object storage API does Jasmine use? B) Sun Microsystems’ Java Blend is a middleware product that allows developers to store Java objects in a relational database without having to create mapping code. With which industry-standard API is the Java interface compliant? Answer to both parts A) and B): ODMG 2.0.
I’m being a little cute here, but you get the point. Object storage is quickly becoming a central issue in database programming and ODMG 2.0 is the industry standard. That’s why I am so sure that ODMG is in your future. Now that you understand why I think it’s important for you to know about ODMG, let me give you a quick overview of the standard and the organization behind the standard. In future columns, we’ll address specific issues in greater depth.
First, I should give you some background on the ODMG organization and its history. The ODMG is a consortium of object-oriented and relational database management system vendors and interested parties that develop standards to allow portability of customer object-oriented applications between databases. The organization was formed in 1991, when Rick Cattell, the ODMG’s chair and a distinguished engineer at JavaSoft, urged a group of then-small object database vendors to work together to create a set of standard language bindings for object databases. Object databases would only attain significance, they reasoned, if there were standards in place that allowed developers to feel comfortable that they weren’t “betting the farm” on a single start-up company. They also knew that they had to act quickly in order to make the standard relevant, so the they decided to build their own organization, outside of conventional standards bodies, with a small membership that was committed to rapid progress. Only a year and half later, in 1993, they published ODMG-93 Release 1.0, which was followed by a major maintenance release in 1995. ODMG 2.0, the most current version of the standard, was published in July of 1997.
Any company or individual may participate in the ODMG, and we’d love to have you as a member. The ODMG has three classes of membership. Voting Members are required by the by-laws either to ship a product with an ODMG-compliant API, or to commit to do so within a specified time period from the date of joining. Reviewer Members may actively participate in workgroups, although they lack actual voting rights. Associate Members are parties interested in having the most current information about standards and the opportunity to participate in ODMG electronic discussion groups, which provide comments to the working groups. The ODMG membership continues to grow and today includes database vendors, tool vendors, consulting firms, and corporate end users. The voting member companies are GemStone Systems, IBEX Object Systems, Lockheed Martin, Object Design, Objectivity, POET Software, Unidata and Versant Object Technology. Reviewer member companies are Andersen Consulting, Baan, CERN, Computer Associates, Electronic Data Systems (EDS), Hitachi, Microsoft, NEC Corporation and Sybase.
The ODMG 2.0 standard extends the Java, C++ and Smalltalk object programming languages to give them full-featured database programming capability so that you work entirely within the native language environment. This concept is known as tight language binding. The obvious benefit to you as a developer is that the combination of application and database programming into a single environment means that you only have to deal with one data model.
One of the great things about ODMG 2.0 is that the APIs are easy to learn and easy to use. That’s because, wherever possible, ODMG is built upon a set of existing standards. The ODMG object model is an extension of the OMG and native language object models. Since you are actually working in your programming language, you’ll find it very easy. OQL, ODMG 2.0’s ad hoc query language, is modeled after SQL-92. In other words, the ODMG 2.0 environment will probably be very familiar to you.
To conclude this introductory examination of the ODMG standard, let’s take a peek at the various components of the ODMG specification, which include an Object Model, an Object Definition Language, an Object Query Language, and Language Bindings to Java, C++, Smalltalk.
Object Model: The ODMG Object Model is a superset of the OMG Object Model that gives it database capabilities, including relationships, extents, collection classes and concurrency control. It is the unifying concept for the ODMG 2.0 standard, and is completely language independent.
Object Definition Language (ODL): ODL is used to define a database schema in a programming-language independent manner in terms of object type, attributes, relationships and operations. The resulting schema can be moved from one database to another and is programming language independent. ODL is a superset of OMG’s IDL.
Object Query Language (OQL): OQL is ODMG’s query language. It closely resembles the SQL-92 SELECT syntax and it includes support for object sets and structures. It also has object extensions to support object identity, complex objects, path expressions, operation invocation and inheritance. ODMG maintains a working relationship with the committee working on SQL3 in an effort to make OQL and the query portion of SQL3 compatible.
Language Bindings: The ODMG Java, C++ and Smalltalk language bindings are extensions of their respective language standards to allow the storage of persistent objects. Each binding includes support for OQL, navigation and transactions. The beauty of such an approach is that a developer can build an entire database application from within a single programming language environment. I briefly discuss the individual language bindings below.
Java Binding: The ODMG Java binding is completely natural to Java programmers. Persistence is by reachability. That means that once a transaction is committed, any objects that can be reached from root objects in the database are automatically made persistent in the database. The ODMG binding to Java adds classes and other constructs to the Java environment to support the ODMG object model, including collections, transactions and databases, without altering the semantics of the language.
C++ Binding: The ODMG C++ binding provides language-transparent extensions to support object creation, naming, manipulation and deletion, and transactions and database operations. The C++ binding allows persistence-capable classes to be created by inheritance. Standard Template Library (STL) algorithms and exception handling are also included.
Smalltalk Binding: The ODMG Smalltalk binding enables the storage of Smalltalk objects, which are made by persistent by reachability – an object is made persistent when it is referenced by another persistent object in the database, and garbage-collected when it is no longer reachable.
Back to my original premise. Why do I say that there’s an ODMG database in your future? Because if you’re going to build web-enabled or multimedia applications, you’re going to end up using objects, and OMDG 2.0 is the definitive standard for object storage. What makes the ODMG APIs really attractive is that they manage the process of storing persistent objects for you – regardless of whether the actual storage mechanism is an object or a relational database. ODMG 2.0 is easy to learn and easy to use, because the tight language bindings extend your programming language to provide database capability in a completely natural way that allows you to concentrate on application development. And since ODMG 2.0 is an industry standard that serious players are already supporting, you have a range of implementations to choose from, based upon your specific requirements.
In future articles, I’ll be discussing different aspects of the ODMG 2.0 standard in greater depth, with topics like a comparison of the ODMG Java binding and JDBC, an examination of the relationship between ODMG 2.0 and the OMG standards and a discussion of ODMG 2.0 and SQL3. I hope to see you here, because there’s an ODMG database in your future!
For more information about the ODMG, visit its web site at www.odmg.org. The Object Database Standard: ODMG 2.0 (ISBN 1-55860-463-4), edited by R. G. G. Cattell and Douglas K. Barry, is published by Morgan Kaufmann Publishers.