Comment Another option: db4objects (Score 1) 139
The runtime is a JAR that's about 300KB in size, with about a 1 meg memory footprint.
Companies like BMW and Bosch have chosen it to drive their automobiles and robots respectively.
The best way to get a feel for db4objects is to look at how simple the code is you get to write. For example:
To store a Pilot object:
To retrieve all pilots:ObjectContainer db=Db4o.openFile(Util.YAPFILENAME);
try {
Pilot pilot1=new Pilot("Michael Schumacher",100);
db.set(pilot1);
}
finally {
db.close();
}
To retrieve a pilot by name: // Put this in a try-finally block like above
ObjectSet result=db.get(Pilot.class);
while (result.hasNext())
System.out.println(result.next ());
To update a pilot: // (use query-by-example)
Pilot proto=new Pilot("Michael Schumacher",0);
ObjectSet result=db.get(proto);
if (result.hasNext()) Pilot firstMatch = (Pilot) result.next();
There's lots more including embedded or client/server operation, transactions, partial activation of large object graphs, and more.ObjectSet result=db.get(new Pilot("Michael Schumacher",0));
Pilot found=(Pilot)result.next();
found.addPoints(11);
db.set(found);
System.out.println("Added 11 points for "+found);
Oh, and db4objects works with plain old Java objects. You don't have to implement interfaces, inherit from a particular class, or anything like that.
If you're looking for the simplest, light-weight, zero-administration, embeddable database you could imagine, in my experience, db4objects is it.
(I liked it so much that as of 1.5 weeks ago I started working for the company.)
Best regards,
Dave Orme
--
db4objects senior engineer
Eclipse Visual Editor Project leader (http://www.eclipse.org/vep)
XSWT project leader (http://xswt.sourceforge.net/)