Databases

Filesystem

I mean, yes, technically databases and files are something different, but fundamentally, similar principles apply. One may treat files as database records, and their ID are their unique paths. Similarly, you can also save lots of arbitrary data in a single database record.

-- Zettlr auf Twitter

SQLite

When to use

Appropriate Uses For SQLite

SQLite vs Filesystem

SQLite reads and writes small blobs (for example, thumbnail images) 35% faster¹ than the same blobs can be read from or written to individual files on disk using fread() or fwrite().

Furthermore, a single SQLite database holding 10-kilobyte blobs uses about 20% less disk space than storing the blobs in individual files.

The performance difference arises (we believe) because when working from an SQLite database, the open() and close() system calls are invoked only once, whereas open() and close() are invoked once for each blob when using blobs stored in individual files. It appears that the overhead of calling open() and close() is greater than the overhead of using the database. The size reduction arises from the fact that individual files are padded out to the next multiple of the filesystem block size, whereas the blobs are packed more tightly into an SQLite database.

-- https://www.sqlite.org/fasterthanfs.html

Spreadsheets

Google Sheets, Airtable JSON API

NoSQL/Document Databases

Save JSON objects in a NoSQL database, but don't expect it to perform well when you try to join or aggregate data.

The essay Why You Should Never Use MongoDB by Sarah Mei illustrates the pitfalls of using NoSQL databases and realizing relational databases were the better choice all along the way.

Tools

HeidiSQL

[[Database - HeidiSQL SSH Tunnel Setup]]

dbeaver CE