A Teeny Tiny DB

A year ago, the only thing I knew about NoSQL was that MongoDB didn’t support joins. And after using MySQL on & off since college, that totally blew my mind. Seriously, no joins?! Fortunately I discovered Firebase, which was a great introduction to NoSQL, and now I’m hooked.

This week I made another NoSQL discovery: TinyDB — a sleek 1,200 line document-oriented database written in Python. Created by Markus Siemens, TinyDB’s API is easy to grok and fits into your projects with minimal effort:

  1. Inserts are easy, just feed in a standard dict
  2. Store data as JSON or in-memory
  3. Create tables / collections
  4. Query via regex, using comparison operators, and with and/or conditions
  5. Update fields across multiple records
  6. The documentation is excellent
  7. Works with Python 2.6 – 3.4

I’d write you some sample code, but Markus’s getting started guide is already top-notch. Give TinyDB a shot, I really think you’ll like it.

Join the discussion
2017 Neal Shyam