To interact with a database system from your code requires some database driver library. For most database systems there are multiple driver libraries, most of which are stable and work well.

There are also options of multi-system and single-system drivers. The multi-system drivers can interface with multiple database systems, usually MySQL, PostgreSQL and SQLite, while single-system drivers only work for a specific database system.

The two main reasons I see for using a multi-system driver are:

  1. You want to reduce the risk in the event you need to switch your database system mid-project. It is rare but possible.
  2. You work on multiple projects which use different database systems. With a multi-system driver you only need to learn one library which works the same for all databases.

My response to those two reasons are:

  1. I consider it extremely unlikely that I will need to switch database systems for the project.
  2. I prefer to use libraries that do one thing well rather than multi-purpose ones. I would rather learn the focused driver for each different database system I use than fighting the unavoidable complexities which come with generalised tools that cater for databases I will never use.

In another post I mentioned that I use PostgreSQL for my application database. I also use SQLite for local configuration files. The drivers I considered are:

  • CL-sxl
  • Sxql
  • CL-dbi
  • CL-sql
  • Postmodern
  • CL-sqlite

Postmodern and CL-sqlite are the only single-system drivers in that list. Due to the two reasons I mentioned above, I use Postmodern and CL-sqlite.