I need an embedded database for my next project. During the last few days I’ve done a lot of virtual leg-work researching and comparing the various alternatives, trawling through documentation and forums. The results are below. Hopefully, if you’re ever in the same situation, this list will make your life a bit easier.
Of course, the list is far from comprehensive – it wasn’t really my goal to include every embedded database in existance, but rather to find those that fit the needs of the project. The focus was on speed, support for multi-threading and connectivity (what programming language interfaces are available for the DB). I also left out databases that are tied to a single language or framework (Java/.NET) – sorry about that, I know there are some good ones.
Without further ado, here are my top choices (in minimalistic list format).
Connectivity : Any programming language (almost)
Platforms : Linux, Mac OS X, OS/2, Windows (Win32 and WinCE) and embedded devices
Footprint : 300 Kb (or 180 Kb with optional features ommitted)
Model : Relational (SQL92 with some exceptions)
License : Public domain
SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world. The source code for SQLite is in the public domain. Includes both a native C library and a simple command line client for its database.
#2 Firebird SQL
Connectivity : .NET, C/C++, Delphi, Java, PHP, Perl, Python, VB, COBOL, etc (see also)
Platforms : Windows (Win 98 and up), Linux (tricky)
Footprint : 4-5 MB
Model : Relational (SQL92 and most of SQL99)
License : Open source (LGPL)
Firebird is a relational database offering many ANSI SQL standard features. (…) Firebird offers excellent concurrency, high performance, and powerful language support for stored procedures and triggers. It has been used in production systems, under a variety of names, since 1981.
- + Referential integrity is supported, which is nice when compared to SQLite.
- + Concurrency support is also decent.
- + Supports triggers and stored procedures.
- - A notably confusing and disjointed website. I had to dig around for a while to find out what I needed to know. Some sections also present outdated information.
- - No built-in full text search.
- - If you casually browse around Friebird’s site you may get the impression that the embedded version only works with .NET (they even have an entire sub-website dedicated to the .NET version). However, you can actually use it with many other languages by downloading the embedded version and using the standard Firebird APIs.
Connectivity : C++, .NET, Delphi (discontinued?)
Platforms : Windows (XP, Vista, Windows Server 2000 – Windows Server 2008)
Footprint : < 4 MB
Model : Relational
License : Free for commercial and non-commercial use
(There is no quote here because almost everything on the website reads like a shallow advertisement. Nevertheless, the feature list looked attractive enough.)
Connectivity : C, C++, Java, Tcl
Platforms : *nix, Windows, Windows CE, VxWorks, S60, BREW
Footpring : 400 Kb (minimum)
Model : Key-value
License : Open source (dual-licensed)
Berkeley DB delivers the same robust data storage features as traditional, relational database systems, such as ACID transactions and recovery; locking, multiple processes and multi-threading for high concurrency; hot and cold backup; and single-master replication for high availability applications. Berkeley DB can manage databases in memory, on disk or both.