Db4o
| Company type | Software |
|---|---|
| Industry | Database management systems |
| Founded | 2001 |
| Founder | Carl Rosenberger |
| Defunct | October 2014 |
| Fate | Discontinued active marketing to new clients |
Area served | Worldwide |
Key people | Carl Rosenberger (Chief Architect) |
| Products | Object database software for Java and .NET |
| Owner | Actian (formerly Db4objects Inc., Versant Corporation) |
| Parent | Actian |
| Website | www |
db4o (database for objects) was an embeddable open-source object database tailored for developers working with Java and the .NET platform. Created, commercially licensed, and supported by Actian, the company discontinued active marketing of db4o to new clients as of October 2014.
History
The idea of object-oriented database systems traces back to the mid-1980s, building on foundational research from the 1970s. The early 1990s saw the introduction of the first commercial object database management systems, which provided native persistence capabilities aligned with object-oriented programming.
A renewed expansion phase took place in the early 2000s when object-oriented databases were fully developed using object-oriented languages. db4o is a prime example of this evolution, being implemented entirely in Java and C#.
Initiated in 2000 by chief architect Carl Rosenberger, db4o was initially released in 2001 and found applications in both enterprise and academic environments before its official commercial debut in 2004 under Db4objects Inc. In 2008, Versant corporation acquired db4o and distributed it as open-source software under a bi-licensing model: both commercial licensing and the GNU General Public License (GPL).
Overview
db4o employs an object-oriented database architecture designed to deliver a native persistence mechanism for object oriented programming. It removes the necessity for separate data model design since the data structure is directly derived from the application's class definitions, effectively resolving the Object-relational impedance mismatch by bypassing the relational database layer.
Developed in Java and .NET languages, db4o provides APIs compatible with both platforms and operates on any operating system supporting these environments. Licensing options include GPL, the db4o Opensource Compatibility License (dOCL), as well as commercial licenses for proprietary deployments.
For developers utilizing relational databases, db4o can serve as a complementary tool through its db4o Replication System (dRS), which facilitates synchronization and migration between object databases (db4o) and relational (RDBMS) systems.
As an embedded database, db4o functions within the same process as the application and is distributed as a single library file (jar or dll).
One-line-of-code database
db4o enables storing any object with a straightforward command: <syntaxhighlight lang="java"> objectContainer.store(new SomeClass()); </syntaxhighlight>
There is no requirement for implementing interfaces, annotations, or attributes. Any class used in the application—including those from third-party libraries—can be persisted. All fields within objects, including collections, are automatically saved, with support for custom type handlers to manage special scenarios.
Embeddable
Engineered for integration within client applications or software components, db4o does not require separate installation. It is provided as a single library file with a footprint approximately 670kB for .NET and about 1MB for Java.
Client-server mode
The client/server edition allows communication between client and server applications over TCP/IP using configurable ports. The communication is managed through messaging protocols. Utilizing "Generic Reflection," db4o can function without persistent classes residing on the server side, although this mode has certain constraints.
Adaptive schema modification
db4o facilitates automatic schema adaptation for straightforward class model alterations, such as adding or removing fields. More intricate changes, including renaming fields, adjusting types, or reorganizing class hierarchies, necessitate the use of small update tools. This capability presents an advantage compared to relational databases, where schema adjustments typically require manual intervention in the application code.
Native query integration
Native Queries (NQ) enable developers to access the database directly using their native programming languages (Java, C#, VB.NET), eliminating the need to switch contexts to string-based query languages like SQL or OQL. NQ guarantees type safety and removes concerns related to sanitizing injected code.
LINQ support
LINQ is fully integrated within db4o for .NET 3.5, allowing object-centric queries with compile-time validation, seamless IDE Intellisense support, and automated refactoring capabilities. Through integration with open-source libraries, optimized LINQ queries are achievable on the Compact Framework. LINQ acts as a connector between relational and object-oriented data stores and provides an abstraction layer that simplifies transitioning between underlying database systems.
Limitations
db4o exhibits typical Object Database shortcomings, such as restricted compatibility with standard SQL tools, reporting systems, OLAP solutions, and backup or recovery utilities. Unlike relational databases, Object Database Management Systems (ODBMSs) lack a formal mathematical underpinning, which impacts the sophistication of their query languages. Although some ODBMS products offer SQL alongside navigational access methods (for example, Objectivity/SQL++, Matisse, InterSystems CACHÉ), balancing both approaches often involves trade-offs.
Specific drawbacks of db4o include:
- Absence of full-text indexing and suboptimal performance in full-text search operations
- No indexing on strings, resulting in slow text-based query execution
- Lack of a universal query language like SQL restricts adaptability in mixed environments
- Replication must be implemented through custom application code rather than administrative tools
- Deleted fields remain invisible until defragmentation is performed
- No native functionality for importing or exporting data in text, XML, or JSON formats
Cross-platform compatibility and deployment
db4o supports Java versions from JDK 1.1.x up to 6.0 and operates on both Java EE and Java SE platforms. It also runs on various Java ME profiles that support reflection (including CDC, Personal Profile, Symbian OS, SavaJe, Zaurus), and upon request can function on reflection-limited profiles (such as CLDC, MIDP, BlackBerry, Palm OS). Testing has been conducted on JavaFX and Silverlight platforms, and db4o is compatible with Android environments.
The platform includes a custom "generic reflector" feature that enables it to handle class metadata even when definitions are missing. This supports hybrid Java-.NET scenarios (for instance, a Java client communicating with a .NET server) and simplifies cross-platform project transitions without requiring database migration.
Documentation and assistance
db4o provides extensive documentation comprising tutorials, API references, online paircast sessions, and blog content. Additional support is accessible through community forums and contributions like articles, translated manuals, and example projects.
For commercial users, db4o offers the dDN (db4o developer network) subscription service that guarantees 24-hour response times and live collaboration sessions via Xtreme Connect.
Object Manager
Object Management Enterprise (OME) serves as a db4o database exploration utility, offered as a plugin compatible with Eclipse and Microsoft Visual Studio 2005/2008. It facilitates navigation through classes and objects, managing database server connections, constructing queries via drag-and-drop, and reviewing database performance metrics.
In addition to browsing capabilities, OME provides administrative functions such as indexing, defragmentation, and data backup. Originally released solely as a commercial product for dDN subscribers, OME has been incorporated into the standard db4o package starting from version 7.8, with its source code accessible in the public db4o SVN repository.
Versions
db4o presents three build categories: development, production, and stable. The development builds contain the latest features intended for testing and feedback from the user community. Production builds focus on stability and reliability suitable for deployment in live environments. Stable builds are tailored for official product releases.
Each commit to the SVN repository triggers an automated continuous build, enabling developers to obtain the most current updates and enhancements.
The naming convention of builds encodes essential information: Example: db4o-7.2.30.9165-java.zip - db4o: product identifier - 7.2: version number - 30: build iteration (week of development) - 9165: SVN revision number - java/net/net35: target platform and framework version
Developers have access to the public SVN repository for source code retrieval and custom build creation.
Overview of key features by build:
| Version | Features |
|---|---|
| Stable (db4o-7.4) | Sharpen release (Java-to-C# conversion tool) |
| Production (db4o-7.4) | Sharpen release (Java-to-C# conversion tool) |
| Development (db4o-7.10) | * Automated Transparent Persistence for Java via Eclipse integration
|
| Last Versant release (db4o-8.0) November 2012 | Available for Java, .NET 3.5, and .NET 4.0 platforms |
External links
- Article on RETSCAN, a retina scanning system using db4o. Drdobbs.com.