SQLLite and QDBM

SQLLite

While LAMP (Linux, Apache, MySQL, PHP/Perl/Python) is still going strong as a web application platform, MySQL is being challenged as the default database by SQLLite (home, download, wiki).  SQLLite is an embeddable SQL database engine, meaning it runs inside your program.  Beside being embeddable, it has these attractive features:

  • Speed – SQLLite is faster than MySQL (benchmark)
  • Code Size – just 25K lines of C
  • Data Size – much smaller backup file than MySQL
  • Data Storage – everything is stored in one file
  • Transaction – built-in and default unlike MySQL
  • Dependency – SQLLite has no external dependencies

Upcoming PHP 5 will include and use SQLLite as its default database engine.  This PHP Internals message outlines the benefits SQLLite brings to PHP.  Interestingly, MySQL client libraries will no longer be bundled with PHP due to some licensing issues.  I am not sure if this is a major trend in the making, but MySQL is taking the embeddable threat seriously enough to work on its own version of embeddable MySQL (mentioned in the October issue of Linux Magazine).

QDBM

If you don't need to use SQL, Mikio Hirabayashi's QDBM is an attractive xDBM-style (GDBM, NDBM, SDBM, Berkeley DB, etc.) database management library.  This benchmark (PDF) compares QDBM with other xDBM libraries.  It's main competitor is Berkeley DB which also offers both hash table and B+ tree API.  In comparison to Berkeley DB, QDBM has a nice speed/data-size ratio.  Only problem is that QDBM is still in beta.  Hopefully, this post will give the open source project more exposure and attract more resources to it.