db4o Object Database

db4o is the open source object database that enables Java and .NET developers to store and retrieve any application object with only one line of code.

Tightly Integrated with Eclipse

  • Object Manager Enterprise (OME) - plugin for DB exploration
  • Class instrumentation plugin allows you to inject persistence capabilities transparently
  • Community contributed plugins also available
The db4o distribution includes Object Manager Enterprise (OME) which allows you to browse your db4o database in a graphical interface. With OME you can check which objects were stored and examine the database structure. Using the OME adhoc query builder, you can create queries to validate business logic in your application or handle simple reporting requirements.


In addition to simple browsing OME provides the following features:

  • Graphical query design (drag & drop)
  • Database object modification and deletion
  • Simultaneous database view while debugging in client/server mode
  • Indexing
  • Defragment
  • Backup
  • Access to db4o developer website within the IDE and updates download


Automagically enable db4o Transparent Persistence for Java via Eclipse

Transparent Activation/Transparent Persistence (TA/TP) significantly simplifies handling of deep object graphs in db4o based applications. The flip side is that this mechanism requires your persistent domain classes to provide appropriate API hooks. These hooks can be implemented manually, alternatively the tedious task of generating this boilerplate code can be delegated to the db4o byte-code instrumentation framework. So far there have been two options to trigger instrumentation: Programmatically, or through a custom Ant task. Now there is a third option, if you happen to be developing with Eclipse: Install the db4o instrumentation plugin and have your classes instrumented in-place and on-the-fly, taking advantage of Eclipse's incremental building features.


Native Queries in Eclipse

Native Queries provide the ability to run one or more lines of code against all instances of a class. Native query expressions should return true to mark specific instances as part of the result set. db4o will attempt to optimize native query expressions and use internal query processor to run them against indexes and without instantiating actual objects, where this is possible.


When using native queries, don't forget that modern integrated development environments (IDEs) can do all the typing work around the native query expression for you, if you use templates and auto completion.

Reporting With BIRT

BIRT is an Eclipse-based open source reporting system. It can be used for web and desktop applications. BIRT can be integrated with db4o by using a script DataSource after you download the BIRT engine and Eclipse BIRT designer plugin.


Persistence for Android

  • Native Java queries
  • 1MB footprint
  • Easiest database you have ever used
  • Object persistence out-of-the-box
  • It's free!
  • db4o runs without a snag on Android and is much easier to use than SQLite.

Although Java programmers are delighted with Android’s full object oriented platform they are frustrated by its bundling with a relational database, requiring cumbersome plumbing between objects and tables. db4o fills the gap by providing a fast and secure, native Java object database that makes storing objects and sharing of data between applications simple and easy.


The Android stack is complete with application framework, development environment, tools, debuggers and vital applications for developers to leverage and create powerful applications. Java is the predominant language used in the framework providing a clear path for object-oriented programming. Java developers can now create rich and exciting applications that run on any Android based phone.

Therefore it is surprising that Android is delivered with a relational database, the only element that does not fit into this object oriented picture. Fortunately, db4objects has the solution. db4o runs seamlessly on Android, enabling native storage and retrieval of objects of any complexity. Now db4o's device-grade software quality, as proven in mission-critical deployments in high speed trains, aircrafts, and photocopiers, can be placed into the hands of every Android developer.


There are many benefits to using an object database like db4o, including easier code maintenance, and the ability to create a variety of new, innovative applications based on more complex data models. Unlike in rigid, predefined SQL tables, db4o allows the storage of dynamic, free-form data, which can be changed or amended any time. In addition, db4o allows for efficient data replication with its db4o Replication System (dRS), another missing element in Android's software stack. As a result, developers can write software applications that enable the backup of user data to a back-end server or their home PC.


Using db4o in your Android apps is FREE!

db4o can be used for free in any application (even if it's proprietary) that's deployed on an Android smartphone. This does not include db4o instances running on the server side or back-end of your Android application if that functionality is included in your application, it's only valid for local storage on the device. If you have more questions please contact us at info@db4o.com


OSGi Bundle

  • Native Java queries
  • 1Mb footprint
  • Easiest database you have ever used
  • Bundled object persistence presented as OSGi service
The OSGi framework is quickly becoming the ubiquitous platform for component based systems, ranging from desktop applications to embedded scenarios. db4o conforms to the OSGi specification for dynamic loading and unloading of the persistence engine. db4o becomes a consistent part of your development process by providing a layer around the db4o core that enables you to simply plug db4o persistence as a service bundle into your OSGi environment.

The main difference between an OSGi environment and a standalone application is the class loading mechanism. db4o needs to know the class definitions of the objects it persists. The fundamental feature provided by the db4o bundle for OSGi is a factory service that issues OSGi aware ObjectContainer instances, readily configured for the environment of the client bundle.


OSGi, db4o and ProSyst

db4o has adapted their native Java object database to OSGi specifications and has released “db4o for OSGi solutions”, an OSGi specific distribution. ProSyst has adopted db4o as the standard Object Persistence Package of ProSyst’s commercial product mBedded Server Professional Edition and has signed a reseller agreement with db4objects to provide a single point of contact for customers seeking the market's leading and most comprehensive OSGi framework with integrated persistence. In addition ProSyst has embedded db4o as an optional package into its open source distribution mBedded Server Equinox Edition.


Native Queries

db4o comes with Native Queries, a new approach to express database queries with Java syntax that is both powerful and remarkably easy to use, completely void of strings. Native Queries are fully checked at compile time, they can be written using IDE autocompletion and they can be automatically refactored by the IDE. Under the hood, Native Queries are optimized to use database indexes by analyzing Java bytecode.


Native Queries are the main db4o query interface and will run out of the box in any environment. They are the recommended way to query databases from your application for all platforms (though in .NET3.5 LINQ is supported and is the recommeded query interface). Because native queries simply use the semantics of your programming language, they are perfectly standardized and a safe choice for the future. Moreover they provide full compliance with the Java Language Specification, so they eliminate the need to learn other non-mainstream database APIs besides Java.

With Native Queries you'll be able to easily run one or more lines of code against all instances of a class. Native query expressions should return true to mark specific instances as part of the result set. db4o will attempt to optimize native query expressions and use internal query processor to run them against indexes and without instantiating actual objects. To be more accurate when optimization is turned on (default) Native Queries will be converted to SODA where this is possible, allowing db4o to use indexes and optimized internal comparison algorithms. Otherwise Native Query may be executed by instantiating all objects, using SODA Evaluations.

Native Queries are available for all platforms supported by db4o.