Showing posts from December, 2013

Using db4o in Android

db4o is a Object oriented database. This tutorial was written to get you started with db4o as quickly as possible. Before you start, please make sure that you have downloaded the latest db4o distribution from the db4objects website.
In this tutorial I have used db4o- from

Then kindly put the file in your project's lib folder and configure project's Build Path.

Enough, Let us start !!!

1. Create a class to configure db4o. I named it as Db4oHelper.


import; import android.content.Context; import android.util.Log; import com.db4o.Db4oEmbedded; import com.db4o.ObjectContainer; import com.db4o.config.EmbeddedConfiguration; public class Db4oHelper { private static ObjectContainer oc = null; private Context context; /** * @param ctx */ public Db4oHelper(Context ctx) { context = ctx; } /** * Create, open and close the database */ public ObjectContainer db() { try { if (oc…