Carbonado
I want to call attention to Carbonado, an open source persistence framework that Brian O'Neill at Amazon developed. TheServerSide also posted an article about Carbonado back in October. Mark Hayes also posted an article on the OTN forums about it.
It's interesting for a couple of reasons. First, it allows a programmer to create Java persistence with some independence of the underlying engine. By default, Carbonado uses Berkeley DB Java Edition, but Berekeley DB "C" Edition, and JDBC can also be specified. This is extremely useful
when an abstraction that supports an SQL-based backend is a requirement,
or when there is a need to synchronize data between Berkeley DB and SQL
databases. In the past, our users have asked for this "engine independence" and our answer has always been that they need to build it themselves at a higher layer. Carbonado provides such a layer. Secondly, Carbonado provides a bunch of higher level features that Berkeley DB doesn't provide (and probably won't, at least for the forseeable future):
- Constraints on attributes. You can set ranges on allowable attribute values.
- Query Language. You can do selections (filters), ordering, counting. Debugging facilities which allow you to see the query plan are also available.
- Joins. While BDB has some join capabilities, Carbonado has a more comprehensive set. Many-to-one, one-to-one, one-to-many, and nautral joins are available. Also, facilities reminiscient of relational views are provided.
- Non-persistent triggers. As in a relational database, these allow custom operations when various actions on persistent records occur. Actions can be invoked before, after, and on failure of an insert, update, or delete.