The Markdown Database Pattern

2026年8月28日4 次浏览来源:Dev.to阅读原文

Your filesystem is already a database.

Most tools just don't treat it that way.

That's the core idea behind the Markdown Database Pattern — written up properly on The Way of Markdown, a site we've been contributing to that makes the case for building things on plain markdown instead of locked-in platforms.

We think it's a pattern worth more attention, so here's the short version.

Treat a folder of markdown files as a database.

Each file is a record.

Frontmatter fields are columns.

Directories are tables.

Tags, wikilinks, and tasks in the body become queryable relations.

You get portability, version control (git works perfectly on plain text), no framework lock-in, and full queryability.

You give up scale and real relational joins — this isn't for millions of records.

It's a lightweight database, honest about its limits.

Once you name it, you start seeing it everywhere.

Obsidian Bases and Dataview already do versions of this, half-consciously.

A team wiki where every page has a and field is one.

A blog with and in frontmatter is one — it just doesn't know it yet.

Sweet spot: up to roughly 10k files.

Past that, reach for a real database.

Below it, this gets you almost everything a database gives you, at a fraction of the complexity, with none of the lock-in.

The full writeup — the complete tradeoff analysis, a worked example with actual queries, how to implement it in a weekend, and the tool (MarkdownDB) that does it for you — is here: wayofmarkdown.com/markdown-database

分享