Nelson's log

Wanted: SQLite for JSON

I like SQLite. It’s such a nice simple data store. It’s fast for small data (< 100 MB), it requires no separate daemon process, it has great support in every language I work in.

I like JSON and the idea of schemaless databases. I want to be able to download JSON blobs from an API or create some new JSON blobs and store them away with a minimum of effort. Typeless. Then I want to be able to query them somehow.

Now I want to mix the two together. I want to take a bunch of JSON objects and store them in somewhere simple, then query them.

MongoDB was the first big “store a bunch of JSON”. It sort of fits the bill for what I want, but it’s way overengineered for my needs. I don’t want a separate database process. I definitely don’t want a separate cluster of database processes. Also MongoDB is fundamentally untrustworthy and should not be used by anyone for anything serious. It might be OK for my casual hacking, particularly without clustering, but then you run into the way the query language is so awkward.

Postgres has decent JSON support with some queries. I will probably try that for my next hack. Unfortunately it requires a separate database process and I prefer the simplicity of sqlite’s “just open the file” design. But I have a Postgres instance lying around already so what’s one more database?