Java databases get small
db4o, PointBase offer relational, object-oriented options for getting data to PDAs
Constraints can specify equals, smaller than, greater than, and even “like” comparisons. Constraints can also be ORed with one another, so you can query for all Employee objects with Salary fields greater than 60,000 or equal to zero. As with the older QBE, the results of a SODA query are returned in a collection object, which can be examined.
db4o’s simple, older version of QBE is quick to learn, but hampered by powerful limitations. The newer, more complicated version is harder to figure out, but with equally powerful benefits. db4o’s older querying method is definitely more limited than PointBase, but the newer is not. However, with SODA’s steep learning curve, you’re investing time and energy in learning and producing code for a query mechanism that isn’t supported in many other databases.
Apart from QBE, the db4o library provides classes and methods that simplify running database applications in servlet/JSP environments. db4o is thread-safe, supports transactions, and handles all the issues of associating a database with a servlet context, closing the database properly when the last session terminates, and, as does PointBase, it supports crash recovery.
db4o has no GUI tools, but it comes with some built-in tools, including a defragmenter program that you can turn loose on your database to reclaim space lost after numerous delete operations. It also has some data-access smarts, silently handling changes in an object schema, for example.
db4o is more like a database engine than anything else -- it’s definitely geared toward the technically savvy, but worth the effort put into figuring it out. It’s fast and small, and you don’t have to rearchitect your object model to use it. That’s its advantage over an RDBMS such as PointBase: With db4o, when you read an object from the database, all its fields are automatically and properly populated.
Let’s get small
These two small Java databases lie at opposite ends of the database spectrum, so you’ll need to consider the expertise of your staff and existing database structure when choosing the one for your enterprise.
PointBase is good for organizations that have programmers who are already well-versed in relational databases and familiar with SQL. Enterprise RDBMSes use tables, as does PointBase, and PointBase has the tools for trimming down existing relational databases. PointBase would be the better choice for companies that want to migrate existing apps from the enterprise to the handheld.
On the other hand, if the app you’re designing has a complex data model that might not break down well or easily into an RDBMS, then db4o is a good choice. If your developers aren’t used to doing database work and are unfamiliar with SQL, db4o will allow them to work with persistent objects without having to learn RDBMS skills.
In short, if you’re a Java programmer looking to fit your database into your purse or pocket, the choices await. Nothing’s stopping you from getting small.
Read more about data management in InfoWorld's Data Management Channel.