Tuesday, January 12, 2010

Choice of Embedded databases

Embedded databases are hidden gem, their prime advantage is availability and speed. Embedded database does not run in a separate process, instead linked into the application that requires the database. This is in contrast to the traditional databases like DB2 or Oracle which runs as a separate process and to which application connects using some protocol such as TCP/IP or sockets. I needed an embedded databases to use with my hobby project, so last few days I did a lot of research and compare with various alternatives. If you are looking for same thing, this blog post intends to make your life a little bit easier.
#1 IBM solidDB
solidDB is IBM's in-memory database that can be embedded directly into application. It supports standard application interfaces such as SQL, JDBC and ODBC. solidDB is good for critical applications as it keeps two copies of databases and can restore data in seconds in case of failover.
IBM allows you to download and use trial version for 90 days. This Developerworks article is a nice starter tutorial to build PHP based dynamic webpages with imbedded solidDB.
License: see the website above
#2 SQLite
SQLite is a freely available and widely used imbedded database engine. It is claimed as a zero configuration database which does not need to be installed or setup or configured in order to use.
Features:
  • cross platform file format - once database file is written, can be used on any machine and any architecture. No need to backup and restore because all architecture and machine utilize the same format.
  • ultra compact - everything included, whole SQlite is 275 KB in size. 
  • supports VARCHAR
  • Manifest typing - datatype is decided by the column value itself and not the column type
  • supports SQL extensions
License:
quoted from SQlite webpage:
"SQLite source code contains no license since it is not governed by copyright. Instead of a license, the SQLite source code offers a blessing:
May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give."
 There are few more choices such as Firebird and Oracle BerkeleyDB.  I am currently evaluating the above two for my embedded db project. I will add my implementation findings to this post, so check back next week. 

3 comments:

Make Everyone Smile

Hey there! Just wanted to let you know that today is officially National 'Make Everyone Smile' Day! So, consider yourself officially...