- 20 May 2026
- 5 min read
You Might Not Need a Database. Yet
Files, then SQL, then NoSQL, then files again

Backend is my full-time job. A database is usually a base part of anything I build.
Yet some of the tools I use every day never had one. Git keeps your whole history in a hidden folder. Many mail servers keep every email as its own file. Kafka, which moves trillions of messages a day at big companies, stores them in plain files on disk. Even this blog is a folder of Markdown files.
So do we really need a database?
The folder is the table

In Maildir, a format from 1995, every email is a file. Its flags are in the name: a file ending in :2,RS was replied to and seen. Mark it as read, and the mail server just renames the file. Delete the email, and its record is gone with it. There is nothing to get out of sync.
Git goes one step further. Every object is a file named after the hash of its content, so the name is the proof that the content is right.
Debugging is a directory listing. A backup is a copy of a folder. In a way, the file system is the database.
Database ideas live on, even without the name
Look closer, and each of these tools has rebuilt part of a database inside.
A lock. Git writes changes to index.lock first. If you ever saw "Unable to create index.lock: File exists", you met Git's lock: one writer at a time.
An atomic commit. Maildir never writes a message where readers look. It writes it to tmp/, then renames it into new/. A rename is atomic, so nobody ever reads half an email. Git updates its branches the same way.
A journal. Kafka never edits data. It appends to log files and replays them after a crash. Its docs even have a section called Don't fear the filesystem!
A migration. Git has been moving from SHA-1 to SHA-256 since 2020. The plan keeps both names for every object during the move. That's exactly how you rename a column: write both, backfill, drop the old one.

You don't avoid the problems a database solves. You meet them one by one, and learn their names.
This has happened before. Several times

Files first. In the 1960s every program kept its own files, and every program had its own bugs with them.
Then SQL. In 1970 Edgar Codd proposed the relational model: describe what you want, and let the database find it. It won for forty years.
Then NoSQL. Around 2009 the web grew faster than one server could handle, and "schemaless" databases promised freedom from tables and migrations.
Then SQL again. That freedom had a price. PostgreSQL got JSON in 2012 and fast binary JSONB in 2014, and MongoDB added multi-document transactions in 2018. In 2024 Michael Stonebraker and Andy Pavlo reviewed twenty years of alternatives in What Goes Around Comes Around... And Around. Their verdict: the alternatives either became relational over time or stayed in a niche.
And now files again. SQLite, a database that is a single file, now runs real production apps. Its own docs say it competes with fopen(), not with database servers. Rails 8 built its queue and cache on it, and Litestream streams every change to S3 as a backup. Analytics teams query plain Parquet files on S3 as if they were tables.
This time, though, the files carry what databases learned: transactions, journals and schemas live inside the file.
When I would add one

For a paying product with more than one server, I'd add PostgreSQL on the first day and not feel clever about it. But for one small server and a folder of files, a database server is one more thing to update, back up and secure. And the next step wouldn't be a database server anyway. It would be one SQLite file.
What I'm taking from this
Before I choose where data lives, I ask what must survive a restart. I write a new file and rename it into place instead of editing the only copy, and I rename fields in three steps: write both, backfill, drop. The tools will swing again in ten years, so I'd rather learn journals, locks and migrations than the next product. And a dependency can wait until its problem actually shows up.