Jump to content

User:D aana/Sandbox

From Wikipedia, the free encyclopedia

Introduction

[edit]

db4o (database for objects) is a high-performance, embeddable open source object database for Java and .NET developers.

It is developed, commercially licensed and supported by Versant. db4o is written in Java and .NET and provides the respective APIs. db4o can run on any operating system that supports Java or .NET. db4o is offered under a dual licence providing a user with a choice between free and commercial depending on the project needs. The db4o engine is free when licensed under the General Public License (GPL) or distributed with non-GPL open source projects under the db4o Opensource Compatibility License (dOCL).

A commercial license is required to embed db4o in a non-GPL, commercial product and/or when professional support is required. db4o quick fact sheet is available on db4o official website.

History

[edit]

Object-oriented Database System term goes back to around 1985, though the first research developments in this area started a bit earlier in mid-1970s. The first commercial object database management systems appeared in early 1990s. They added a concept of persistence into the object-oriented languages.

The second growth wave was observed in early 2000s, when the Object 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#.

db4o project was started in 2000 by Chief Architect Carl Rosenberger, and first shipped in 2001. Some 100 commercial pilot customers and community users have supported db4o from its earliest days and successfully implemented it in some mission-critical applications prior to its commercial launch in 2004 by newly-created private company Db4objects Inc.

In 2008 db4o object database business was bought by Versant corporation, which is the current owner and developer of db4o. db4o is offered to the market as an open-source bi-licensed software (commercial and GPL). Since the initial launch db4o database has gone through many changes and improvements (see #Versions) till the current production release of version 7.

Place in the database world

[edit]

Computer Database can be build using different models or combination of them. 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.

db4o naturally comes as an answer to object/relational impedance mismatch by eliminating the relational layer off your software project. This allows shrinking development time and cost considerably in the same time simplifying project maintenance. For more information see db4o features.

As an embedded database db4o can be run in application process. It is distributed as a library (jar/dll) and is simply referenced from the development project. Embedded into an application db4o requires very little (zero) administration, it can be installed/upgraded in the product installation cycle. Development with db4o database does not require a separate data model creation, the application’s class model defines the structure of the data in db4o database.

db4o is can be integrated with language xml APIs, which allows simple import/export from xml. It can also be used with reporting tools like BIRT, JasperReports for Java or Microsoft reporting APIs for .NET.

Developers using relational databases can also benefit from using db4o, which can be viewed as a complementary tool. For example, when runtime data is collected in db4o database, providing the benefits of speed, zero-admin, complex object structure handling and small footprint, and further collected into central relational storage for reporting. 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.

db4o team recognises the importance of developing a world-wide standard for object database querying language and takes an active part in OMG standardization effort. Currently Microsoft LINQ for .NET is considered by many developers and researches to be the best example of such querying language and a lot of effort is taken to transfer its principals in a language-independent querying standard. Another effort in supporting object database development sponsored by db4o is ODBMS educational resource. Being a free and open-source software db4o is chosen by several universities as part of OOP study course.

Features (LINQ, Native Queries, CS/embedded)

[edit]

One-Line-of-Code Database

[edit]

db4o makes object persistence really easy: you can store any object with just one line of code:

objectContainer.store(new SomeClass());

Note that SomeClass here does not require any interface implementations, annotations or attributes added. It can be just 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 customary typehandlers.

Embeddable

[edit]

db4o is designed to be embedded in clients or other software components completely invisible to the end user. Thus, db4o needs no separate installation mechanism, but comes as just one easily deployable library with a very low footprint of ~670kB in .NET version and around 1MB in java version.

Client-server mode

[edit]

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

Due to using Generic Reflection db4o can work without implementing persistent classes on the server. However, this mode has certain limitations.

Client-server performance is dependent on the network bandwidth. The querying performance can be enhanced by using Lazy Queries.

Dynamic Schema Evolution

[edit]

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. In most cases the code upgrade cannot be automated as the actual query language is string based (SQL) and is not recognised by IDE autocompletion and code generation tools like Intellisense.

Portability and Cross-Platform Deployment

[edit]

db4o supports Java's JDK 1.1.x through 6.0 and runs on J2EE and J2SE. db4o also runs with J2ME 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 also successfully tested on JavaFX and Silverlight.

db4o runs out of the box on Android.

db4o uses custom 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. Generic reflector also makes it easy to convert the project between environments, as the database does not have to be converted.

Native Queries

[edit]

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.

LINQ support is fully integrated in db4o for .NET version 3.5. LINQ allows to create 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 storages, thus providing a bridge between them, which can be valuable for projects using both technologies, or for the projects migrating between the two. It can also be used as an abstraction layer, allowing to easily switch the underlying database technology.

Documentation and Support

[edit]

db4o provides various sources of documentation: tutorial, reference documentation, API documentation, online paircasts and blogs. Lots of important information can also be retrieved from forums and community additions (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 [1].

Object Manager

[edit]

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 to browse classes and objects in the database, connect to a database server, build queries using drag&drop, view database statistics etc.

In addition to graphical interface to db4o database OME provide some administrative functions as:

  • Indexing
  • Defragmentation
  • Backup

OME was initially suggested to the 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, i.e: https://source.db4o.com/db4o/enterprise

Community Support

[edit]

From its first days db4o had its focus on satisfying developer needs. Over the years the community of db4o registered members has grown to over 60000 members[2]. db4o has lots of trust in its community and many important db4o projects, such as standalone Object Manager, encryption support, Mono support etc, are fully driven by community members. db4o Code Commander program defines the terms and conditions of community project development.

db4o provides free access to its code, documentation, forums and releases to the community members. The community vote for most important features and most critical bugs is taken into consideration when defining the road map and weekly iteration plans. From time to time db4o holds different contests[3] allowing the community members to come up with the best suggestion for an improvement of a specific db4o aspect, which are later on integrated into the core code.

Customers and Partners

[edit]

db4o clients include well-known companies like BMW, Boeing, Bosch, IBM, Intel, Ricoh, Seagate and others. db4o’s main attractions to a commercial customer are:

  • full integration with development language (slashes down the development and support time)
  • zero-admin database (ideal for embedded devices)
  • small footprint (ideal for embedded devices)
  • performance (ideal for systems that require fast processing of complex data)
  • effortless schema evolution/refactoring (ideal for systems with frequently changing data profiles, research systems and prototypes).
  • fast support for the latest technologies, like LINQ

db4o partners with many commercial and open-source companies[4], which helps to ensure the compatibility with the industry-leading platforms and helps to grow and strengthen open-source community.

Development Process

[edit]

db4o team members are located in different parts of the world, which poses a certain challenge over the development process. In this situation it is important to ensure that regular communication flow is enforced and team focus is clear to all the participants. Keeping this in mind db4o team selected XP agile practices as a strategy allowing to deliver quality maintainable product, which meets the user’s needs. XP enforces regular communication through pair development and rotating peers. It also helps db4o team to stay focused and responsive to client needs by selecting short (weekly) iterations. Constant development speed and productivity is controlled by calculating planned and actual Ideal Developer Sessions (IDS), where IDS is an approximate duration of one pairing session (2-3 hours). With this strategy iteration tasks are estimated in IDS at the beginning of iteration, and each task is assigned to a pair of programmers. The amount of tasks that can be finalised during one iteration is assumed to be equal (in IDS) to the amount of tasks completed in the previous iteration (IDS).

The development process is observed by an XP coach who provides the feedback and helps the team to stay on track. The client’s feedback is coming from actual customers and community.

A smooth and efficient process is assisted by using the right tools:

  • JIRA:[5] allows close tracking of the process, progress reporting, prioritization of tasks, collecting user feedback. JIRA is linked to weekly iterations and tasks are estimated in IDS
  • SVN:[6] version control, branching, easy merging of bug fixes, open to the users
  • Wiki:[7] collaboration on design and documentation, process notes

Performance

[edit]

db4o uses an open-source Poleposition database benchmark to compare performance with different object and relational databases. db4o shows excellent results on read, write, query, delete operations, especially for deep object hierarchies.

db4o high performance is achieved by eliminating OR mapping layer, using Btree indexes and caching mechanisms. Additional performance improvement configuration switches are available to developers, such as in-memory database, BTree configurations, commit frequency, NonFlushingIoAdapter etc[8].

More information on db4o comparison benchmarks can be obtained from official db4o web-site[9].

Versions

[edit]

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 get the newest features hot.

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 current stable, production and development builds:

Version Features
Stable (db4o-7.4)[10] Sharpen release (java to c# converter)
Production (db4o-7.4)[11] Sharpen release (java to c# converter)
Development (db4o-7.10)[12]
  • Automagically enable db4o Transparent Persistence for Java via Eclipse
  • Transparent Persistence for Java Collections

Publications

[edit]

Below is the list of the most recent publications (2008). For the list of historical publications, please refer to db4o official website[13].

2008


  • "Versant moves into embedded with DB4O acquisition" [14]
  • "db4o First Database in the Industry to Support Optimized LINQ on the Compact Framework" [15]
  • InfoWorld awards db4o with "Best of Open Source Developer Tools" [16]
  • "Rapid Linux apps using object databases" [17]
  • "db4o Sharpens its Image" [18]
  • "db4o Open Source Object-Oriented Database Supports LINQ" [19]
  • "Next-Generation Object-Oriented Databases: An Interview with db4objects' Anat Gafni" [20]
  • "An introduction to LINQ for db4o" by Edwin Vermeer [21]
  • "When to use an Embedded ODBMS" (by Rick Grehan) [22]
  • "Object-oriented database programming with db4o - Part 2" [23]
  • "db4o in the Mirror of JPA/EJB and Hibernate" (PDF) [24]

Notes

[edit]