Db4o

Last updated
Db4o
Developer(s) Actian
Stable release
8.0
Written in C#, Java
Operating system Cross-platform
Type Object database
License GNU General Public License (GPL)
db4o Opensource Compatibility License (dOCL)
Proprietary license

db4o (database for objects) was an embeddable open-source object database for Java and .NET developers. It was developed, commercially licensed and supported by Actian. In October 2014, Actian declined to continue to actively pursue and promote the commercial db4o product offering for new customers. [1]

Contents

History

The term object-oriented database system dates back to around 1985, though the first research developments in this area started during the mid-1970s. The first commercial object database management systems were created in the early 1990s; these added the concept of native database driven persistence into the field of object-oriented development.

The second wave of growth was observed in the first decade of the 21st century, when object-oriented databases written completely in an object-oriented language appeared on the market. db4o is one of the examples of such systems written completely in Java and C#.

The db4o project was started in 2000 by chief architect Carl Rosenberger, shipping in 2001. It was used in enterprise and academic applications prior to its commercial announcement in 2004 by newly created private company Db4objects Inc.

In 2008 db4o was purchased by Versant corporation, which marketed it as open-source bi-licensed software: commercial and the GNU General Public License (GPL).

Overview

db4o represents an object-oriented database model. One of its main goals is to provide an easy and native interface to persistence for object oriented programming languages. Development with db4o database does not require a separate data model creation, the application's class model defines the structure of the data. db4o attempts to avoid the object/relational impedance mismatch by eliminating the relational layer from a software project. db4o is written in Java and .NET and provides the respective APIs. It can run on any operating system that supports Java or .NET. It is offered under licenses including GPL, the db4o Opensource Compatibility License (dOCL), and a commercial license for use in proprietary software.

Developers using relational databases can view db40 as a complementary tool. The db4o-RDBMS data exchange can be implemented using db4o Replication System (dRS). dRS can also be used for migration between object (db4o) and relational (RDBMS) technologies.

As an embedded database db4o can be run in application process. It is distributed as a library (jar/dll).

Features

One-line-of-code database

db4o contains a function to store any object:

objectContainer.store(newSomeClass());

SomeClass here does not require any interface implementations, annotations or attributes added. It can be any application class including third-party classes contained in referenced libraries.

All field objects (including collections) are saved automatically. Special cases can be handled through writing custom type handlers. [2]

Embeddable

db4o is designed to be embedded in clients or other software components invisible to the end user. Thus, db4o needs no separate installation mechanism, but comes as a single library file with a footprint of around 670kB in the .NET version and around 1MB in the Java version.

Client-server mode

Client/server version allows db4o to communicate between client and server-side applications. It uses TCP/IP for client-server communication and allows to configure port number. Communication is implemented through messaging.

Due to a feature referred to as "Generic Reflection", db4o can work without implementing persistent classes on the server. However, this mode has limitations. [3]

Dynamic schema evolution

db4o supports automatic object schema evolution for the basic class model changes (field name deletion/addition). More complex class model modifications, like field name change, field type change, hierarchy move are not automated out-of-the box, but can be automated by writing small utility update program (see documentation).

This feature can be viewed as an advantage over relational model, where any change in the schema results in mostly manual code review and upgrade to match the schema changes.

Native queries

Rather than using string-based APIs (such as SQL, OQL, JDOQL, EJB QL, and SODA), Native Queries (NQ) allow developers to simply use the programming language itself (e.g., Java, C#, or VB.NET) to access the database and thus avoid a constant, productivity-reducing context switch between programming language and data access API. Native Queries also provide type safety, as well as remove the need to sanitize against code injection (see SQL Injection).

LINQ

LINQ support is fully integrated in db4o for .NET version 3.5. LINQ allows the creation of object-oriented queries of any complexity with the benefit of compile-time checking, IDE Intellisense integration and automated refactoring.

Due to integration with some open-source libraries db4o also allows optimized LINQ queries on Compact Framework.

LINQ can be used both against relational and object data storage, thus providing a bridge between them. It can also be used as an abstraction layer, allowing to easily switch the underlying database technology.

Disadvantages

The drawbacks and difficulties faced by other Object Databases also apply to Db4o:

Other things that work against ODBMS seem to be the lack of interoperability with a great number of tools/features that are taken for granted concerning SQL, including but not limited to industry standard connectivity, reporting tools, OLAP tools, and backup and recovery standards.[ citation needed ] Object databases also lack a formal mathematical foundation, unlike the relational model, and this in turn leads to weaknesses in their query support. However, some ODBMSs fully support SQL in addition to navigational access, e.g. Objectivity/SQL++, Matisse, and InterSystems CACHÉ. Effective use may require compromises to keep both paradigms in sync.

Disadvantages specific to Db4o may include:

Portability and cross-platform deployment

db4o supported Java's JDK 1.1.x through 6.0 and runs on Java EE and Java SE. db4o also runs with Java ME dialects that support reflection, such as CDC, Personal Profile, Symbian OS, SavaJe and Zaurus. Depending on customer demand, db4o will also run on dialects without reflection, such as CLDC, MIDP, BlackBerry and Palm OS.

db4o was successfully tested on JavaFX and Silverlight. db4o ran on Android.

db4o uses a custom feature called "generic reflector" to represent class information, when class definitions are not available, which allows to use it in a mixed Java-.NET environment, for example Java client - .NET server and vice versa. [3] Generic reflector also aids the conversion of the project between environments, as the database does not have to be converted.

Documentation and support

db4o provides sources of documentation: tutorial, [5] reference documentation, [6] API documentation, [7] online paircasts [8] and blogs. [9] Information can also be retrieved from forums [10] and community additions [11] (articles, translated documentation sources, sample projects etc.).

For commercial users db4o suggests dDN (db4o developer network) subscription with guaranteed 24-hour support and live pairing sessions with the client – Xtreme Connect. [12]

Object Manager

Object Management Enterprise (OME) is a db4o database browsing tool, which is available as a plugin to Eclipse and MS Visual Studio 2005/2008. OME allows the browsing of classes and objects in the database, connection to a database server, building queries using drag&drop and using database statistics.

OME provide some administrative functions as indexing, de-fragmentation and backup. OME was initially suggested to customers as a commercial product only available to dDN subscribers. From the db4o version 7.8 OME was included into standard db4o distribution and the source was made available to the public in db4o svn repository. [13]

Versions

db4o releases development, production and stable builds. Development version provides the newest features and is released for testing, community feedback and evaluation. Production version is meant to be used in production environment and includes features that have been already evaluated and proven by time. Stable version is meant to be used in final product shipment.

db4o also runs a continuous build, which is triggered by any new change committed to the SVN code repository. This build is open to community and can be used to evaluate the latest changes and acquire the newest features.

db4o build name format is meant to provide all the necessary information about the version, time of build and supported platform:

For example: db4o-7.2.30.9165-java.zip

db4o – name of the product, i.e. db4o database engine

7.2 – the release number

30 – iteration number, i.e. a sequential number identifying a development week

9165 – SVN revision number, corresponding to the last commit that triggered the build

java – Java version of db4o. .NET version is identified by “net” for .NET 2.0 releases or “net35” for .NET 3.5 version. .NET version includes the corresponding Compact Framework release.

db4o public SVN repository is also available for the developers to get the source code and build versions locally with or without custom modifications.

Below is a short summary of the main features of the stable, production and development builds:

VersionFeatures
Stable (db4o-7.4) [14] Sharpen release (java to c# converter)
Production (db4o-7.4) [14] Sharpen release (java to c# converter)
Development (db4o-7.10) [15]
  • Automagically enable db4o Transparent Persistence for Java via Eclipse
  • Transparent Persistence for Java Collections
Last Versant release (db4o-8.0) [1]
November 2012
Java, .NET 3.5, .NET 4.0

Related Research Articles

<span class="mw-page-title-main">Object database</span> Type of database management system

An object database or object-oriented database is a database management system in which information is represented in the form of objects as used in object-oriented programming. Object databases are different from relational databases which are table-oriented. A third type, object–relational databases, is a hybrid of both approaches.

Structured Query Language (SQL), is a domain-specific language used in programming and designed for managing data held in a relational database management system (RDBMS), or for stream processing in a relational data stream management system (RDSMS). It is particularly useful in handling structured data, i.e., data incorporating relations among entities and variables.

<span class="mw-page-title-main">Informix</span> Database management software product family

Informix is a product family within IBM's Information Management division that is centered on several relational database management system (RDBMS) and Multi-model database offerings. The Informix products were originally developed by Informix Corporation, whose Informix Software subsidiary was acquired by IBM in 2001.

<span class="mw-page-title-main">Ingres (database)</span>

Ingres Database is a proprietary SQL relational database management system intended to support large commercial and government applications.

<span class="mw-page-title-main">IBM Db2</span> Relational model database server

Db2 is a family of data management products, including database servers, developed by IBM. It initially supported the relational model, but was extended to support object–relational features and non-relational structures like JSON and XML. The brand name was originally styled as DB/2, then DB2 until 2017 and finally changed to its present form.

Hibernate ORM is an object–relational mapping tool for the Java programming language. It provides a framework for mapping an object-oriented domain model to a relational database. Hibernate handles object–relational impedance mismatch problems by replacing direct, persistent database accesses with high-level object handling functions.

ADO.NET is a data access technology from the Microsoft .NET Framework that provides communication between relational and non-relational systems through a common set of components. ADO.NET is a set of computer software components that programmers can use to access data and data services from a database. It is a part of the base class library that is included with the Microsoft .NET Framework. It is commonly used by programmers to access and modify data stored in relational database systems, though it can also access data in non-relational data sources. ADO.NET is sometimes considered an evolution of ActiveX Data Objects (ADO) technology, but was changed so extensively that it can be considered an entirely new product.

The following tables compare general and technical information for a number of relational database management systems. Please see the individual products' articles for further information. Unless otherwise specified in footnotes, comparisons are based on the stable versions without any add-ons, extensions or external programs.

<span class="mw-page-title-main">NHibernate</span>

NHibernate is an object–relational mapping (ORM) solution for the Microsoft .NET platform. It provides a framework for mapping an object-oriented domain model to a traditional relational database. Its purpose is to relieve the developer from a significant portion of relational data persistence-related programming tasks. NHibernate is free and open-source software that is distributed under the GNU Lesser General Public License. NHibernate is a port of Hibernate.

Jakarta PersistenceAPI is a Jakarta EE application programming interface specification that describes the management of relational data in enterprise Java applications.

Entity Framework (EF) is an open source object–relational mapping (ORM) framework for ADO.NET. It was originally shipped as an integral part of .NET Framework, however starting with Entity Framework version 6.0 it has been delivered separately from the .NET Framework.

Language Integrated Query is a Microsoft .NET Framework component that adds native data querying capabilities to .NET languages, originally released as a major part of .NET Framework 3.5 in 2007.

An embedded database system is a database management system (DBMS) which is tightly integrated with an application software; it is embedded in the application. It is a broad technology category that includes:

Quick Objects is a powerful object–relational mapping tool for Microsoft .NET Framework, a built in framework for business logic and validation. The architecture for Quick Objects is different from other ORM tools. Focus of Quick Objects to provide the advantages of code reuse, code generation and object relational mapping in a single tool set.

Apache Empire-db is a Java library that provides a high level object-oriented API for accessing relational database management systems (RDBMS) through JDBC. Apache Empire-db is open source and provided under the Apache License 2.0 from the Apache Software Foundation.

Versant Corporation was an American-based software company building specialized NoSQL data management systems. Versant products are deployed in industries including: telecommunications, defense, life sciences, biomedical, transportation, finance, and online gaming. Versant was founded in Menlo Park, California (USA) in 1988. It was headquartered in Redwood City, California. Engineering teams were located in Hamburg, Germany and Redwood City.

Java Database Connectivity (JDBC) is an application programming interface (API) for the Java programming language, which defines how a client may access a database. It is a Java-based data access technology used for Java database connectivity. It is part of the Java Standard Edition platform, from Oracle Corporation. It provides methods to query and update data in a database, and is oriented toward relational databases. A JDBC-to-ODBC bridge enables connections to any ODBC-accessible data source in the Java virtual machine (JVM) host environment.

<span class="mw-page-title-main">Actian NoSQL Object Database</span>

Actian NoSQL Database is an object database software product initially developed by Versant Corporation and currently owned by Actian.

<span class="mw-page-title-main">Actian Zen</span>

Actian Zen is an ACID-compliant, Zero-DBA, Embedded, Nano-footprint, Multi-Model, Multi-Platform database management system (DBMS) developed originally by Pervasive Software, which was acquired by Actian Corporation in 2013.

Oracle TopLink is a mapping and persistence framework for Java developers. TopLink is produced by Oracle and is a part of Oracle's OracleAS, WebLogic, and OC4J servers. It is an object-persistence and object-transformation framework. TopLink provides development tools and run-time functionalities that ease the development process and help increase functionality. Persistent object-oriented data is stored in relational databases which helps build high-performance applications. Storing data in either XML or relational databases is made possible by transforming it from object-oriented data.

References

  1. 1 2 "Actian statement about DB4O". Actian. Retrieved March 17, 2015.
  2. "TypeHandlers". Archived from the original on 2011-07-09. Retrieved 2010-08-26.
  3. 1 2 "Db4o Reflection API". Archived from the original on 2011-04-04. Retrieved 2010-08-26.
  4. 1 2 3 "Archived copy" (PDF). Archived from the original (PDF) on 2011-07-06. Retrieved 2010-10-11.{{cite web}}: CS1 maint: archived copy as title (link)
  5. "Archived copy". Archived from the original on 2010-12-17. Retrieved 2010-08-26.{{cite web}}: CS1 maint: archived copy as title (link)
  6. "Documentation". Archived from the original on 2010-11-06. Retrieved 2010-08-26.
  7. "Archived copy". Archived from the original on 2011-03-18. Retrieved 2010-08-26.{{cite web}}: CS1 maint: archived copy as title (link)
  8. "Webcasts". Archived from the original on 2010-10-10. Retrieved 2010-08-26.
  9. "Blogs". Archived from the original on 2010-09-22. Retrieved 2010-08-26.
  10. "Db4o Developer Community - Forums". Archived from the original on 2009-05-12. Retrieved 2009-06-10.
  11. "Db4o Developer Community - ProjectSpaces". Archived from the original on 2009-02-25. Retrieved 2009-06-10.
  12. "Product Information". Archived from the original on 2009-03-02. Retrieved 2009-06-10.
  13. "Revision 15856: /Trunk/Enterprise". Archived from the original on 2011-07-09. Retrieved 2010-08-26.
  14. 1 2 "Download Center: Db4o 7.4". Archived from the original on 2009-02-08. Retrieved 2009-06-10.
  15. "Download Center: Db4o 7.10". Archived from the original on 2009-05-31. Retrieved 2009-06-10.

Further reading