Introduction to In-Memory Databases

I have been using a tool in programming projects for a couple years called SQLite. Essentially, this is a lightweight database with functionality similar to (but not as advanced as) relational database management systems like Oracle, SQL Server, or MySQL. One key difference is that SQLite databases reside either in memory or in a single file on the file system. So even though they are typically called “in-memory databases,” they can also store their data in a file.

This type of tool can come in handy in lots of places, such as the following:

  • Simple data-driven Web sites (where concurrency needs are minimal and when using only one server)
  • Simple data-driven desktop applications (it’s often easier to store and retrieve data using SQL functionality than flat files or XML)
  • Transporting data (along with metadata) from one application boundary to another (such as is often done via XML)
  • Caching data in memory in a structured form that can be queried easily
  • Caching data temporarily in a file rather than in memory to reduce memory consumption when working with large data sets
  • Creating test databases for unit testing (see also here)
  • Others?

This type of tool is likely not suitable for purposes such as the following:

  • High-traffic Web sites where advanced concurrency must be supported
  • Client-server architectures
  • Using advanced features such as stored procedures

Some other popular in-memory databases:

What types of projects are you using in-memory databases for?

Leave a Reply