Markdown is perfect for (small) databases. Here's how ... A developer outlined the "Markdown Database Pattern," in which a folder of markdown files with YAML frontmatter serves as a lightweight database: each file is a record, each frontmatter field a column, and the folder a table. The approach requires no server or schema, can be queried with a short Python list comprehension or grep, and is editable by AI coding agents like Claude Code and Cursor, which can read the files and add new records in plain English. The developer recommends it for hundreds to a few thousand records, pointing to Postgres for millions of rows or concurrent writes. Here's a database: five markdown files about Harry Potter characters, sitting in a folder. No server, no schema. Obsidian shows it as a table I can sort and edit, ten lines of Python query it, and when I ask Claude Code in plain English to add Ron, it does. The folder: characters/ harry-potter.md hermione.md malfoy.md dumbledore.md luna.md And each file looks like this: --- name: Harry Potter house: Gryffindor status: Alive creature: Hedwig Owl --- Harry Potter The boy who lived. Notes go here, as long as you like. Characters without a pet get creature: - . The bit between the --- lines is frontmatter: plain YAML at the top of a markdown file. Almost every markdown tool understands it already. That's it. You've made a database: markdown file → record frontmatter field → column folder → table No install, no schema. Want a new column? Add a field to a file. Open the folder in Obsidian, add a Base https://help.obsidian.md/bases , and there it is: Sort by house, filter to the living, edit a cell and it writes straight back to the file. This is the thing Notion is good at, structured fields plus free text in one place. Except here every record is a text file on your own disk, in git if you like, editable in any editor, and still there if Obsidian disappears tomorrow. You don't need a database engine either. Frontmatter is so simple that a query is a list comprehension: python import pathlib def records folder : for f in sorted pathlib.Path folder .glob " .md" : head = f.read text .split "---" 1 yield dict line.split ": ", 1 for line in head.strip .splitlines alive with pets = r for r in records "characters" if r "status" == "Alive" and r "creature" = "-" for r in alive with pets: print f'{r "name" :<18} {r "house" :<11} {r "creature" }' Harry Potter Gryffindor Hedwig Owl Hermione Granger Gryffindor Crookshanks Cat No libraries. That little parser only handles simple key: value lines and assumes every file has every field; for real YAML use a YAML library. You get the idea. And for quick questions plain grep works fine: bash $ grep -l "house: Gryffindor" characters/ .md characters/dumbledore.md characters/harry-potter.md characters/hermione.md This is why I think the pattern has gone from "neat trick" to "obviously the right way" in the last year. AI agents are brilliant at plain files. Point Claude Code or Cursor at the folder and the query language is English: Which characters are dead? Add Ron Weasley with the same fields. It reads the files, tells you Dumbledore, and writes characters/ron.md : --- name: Ron Weasley house: Gryffindor status: Alive creature: Scabbers Rat --- Ron Weasley Harry's best friend. Sixth of seven Weasley children. Run the Python again and Ron shows up. You and the agent are working on the same files, and git shows you exactly what it changed. With Notion you'd be wiring up an API integration before you got this far. Hundreds of records, a few thousand, great. Millions of rows, lots of joins, many people writing at once: use Postgres. But a surprising amount of life fits in a few thousand records: books you've read, recipes, people you've met, projects, a team's decisions, a product catalog, a blog. I call this the Markdown Database Pattern. The full write-up, plus a step-by-step guide to building one from an empty folder, is on The Way of Markdown: wayofmarkdown.com/markdown-database https://wayofmarkdown.com/markdown-database What have you got in markdown that's secretly a database? 😎