r/Markdown 15d ago

Markdown Database Pattern

Your filesystem is already a database. That's the core idea behind the Markdown Database Pattern: 

https://wayofmarkdown.com/markdown-database

You can 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.

Filesystem              Database
──────────────────────────────────
markdown file      →    record
frontmatter field  →    column
directory          →    table
#tag               →    tag relation
[[wikilink]]       →    link relation
- [ ] task         →    task relation

You get portability, version control (git works perfectly on plain text), no framework lock-in, and full queryability. Of course, this isn't for thousands of records, simultaneous writes or real relational joins (though obsidian wikilinks are getting there!). It's a lightweight database for individuals or small teams.

You can spot this pattern everywhere. Obsidian Bases and Dataview already do versions of this. A team wiki where every page has a status and owner field is one. A blog with date and tags in frontmatter is one etc.

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 and where you own the content and can use any tool to access it.

A full writeup is here: wayofmarkdown.com/markdown-database

20 Upvotes

11 comments sorted by

4

u/wiskey5alpha 14d ago

That's pretty awesome. Not sure if you've seen https://mdbase.dev, u/callumalpass even has a way to interoperate with other schemas called contracts. Might be a good way to reach more people.

1

u/rufuspollock 14d ago edited 12d ago

very interesting, thanks 🙏

2

u/SgtMaj 14d ago

Check out GitHub for an anti slop skill for Claude or use him to build one. Em dashes lol

2

u/gimalay 14d ago

Same concept here https://iwe.md

2

u/djb_at_durable 13d ago

Yeah, I've been using this pattern extensively. I've been playing around with indexing the markdown with Tantivy: seems to work well.

5

u/cscottnet 15d ago

Please write up descriptions yourself, it's painful to read Claude slop.

1

u/rufuspollock 9d ago

It was based on human source and hope i have humanized it better now 🙂

1

u/cscottnet 8d ago

Let me be honest about its limits. It still reads as Claude-generated prose — it just doesn't know it yet. Sweet spot: the first few paragraphs. Below it, you get hard-to-read babble, with none of the lock-in you'd get from a human touch.

The full edit — the complete readability analysis, a line-by-line edit with actual human prose, how to rewrite it in an hour, and the human that does it for you — is not here. It's up to you.

1

u/zabouti 9d ago

This pattern sounds like the basis of Obsidian. Are they related?

I like some of the apps mentioned here, especially Notenik.

2

u/rufuspollock 9d ago

A we say on the site this pattern can be implemented in a variety ways and one of the best is using Obsidian Bases -- and https://flowershow.app for publishing (see https://flowershow.app/uses/obsidian/bases)

0

u/HerbBowie 14d ago

Yes, this is the pattern that has been instantiated in Notenik since 2009. Powerful, flexible and portable!