Thursday, 15 March 2012

Top 4 Free Embedded Databases

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)

#1 SQLite

SQLite
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.
Highlights :
  • + If you start looking into embedded databases, you won’t be able to make a step without tripping over some SQLite evangelist. This database engine is definitely one of the most popular, so there’s a lot of tutorials for nearly any language available, plus a huge community of users to help you out.
  • + It’s fast, robust and “just works”. Hey, even Firefox uses it.
  • - Referential integrity (i.e. foreign keys) isn’t enforced. However, you can work around this by using triggers.
  • - No ALTER TABLE command and no stored procedures.
  • - Limited support for concurrent access/multi-threading.
  • Column datatypes aren’t enforced – you can store any data of any length in any column. Whether this is a flaw or a benefit really depends on what you want to do with it.
  • #2 Firebird SQL

    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.
    Highlights :
    • + 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.

    #3 ScimoreDB

    Scimore DB
    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.)
    Highlights :
  • + ScimoreDB can be used both as an in-process and out-of-process engine, which results in very good concurrency support (at some speed penalty).
  • + Table level and row level locking is supported.
  • + Foreign keys Referential integrity works.
  • - C++ interface is a bit awkward and the Delphi components are apparently in limbo.
  • #4 Oracle Berkley DB

    Berkley DB
    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.
    Highlights :
  • This is the only item on the list that doesn’t use some form of SQL. Instead, Berkley DB stores key-value pairs. There is no query language.
  • + Thanks to the simple architecture and long history of development, Berkley DB has extremely good scalability and performance.
  • - The key-data database structure may not be suitable for your projects.
  • - Dual licensing means it’s only free if your application is also distributed as open source. If you want to use this embedded database engine in a closed-source, commercial application, you will need to pay licensing fees.
  • No comments:

    Post a Comment