Databases Storage Guide

Your data is in the wrong place: a plain guide to storage and databases

Contracts in email attachments, customer records in a spreadsheet that four people edit, scans in a folder called 'final-FINAL'. The problem is not messiness; it is that each kind of data needs a different home. Here is the map.

APFlow
Blog · June 2026 · 8 min read
Tall organized warehouse shelves
Photo: Lance Chang, Unsplash
TL;DR
  • ·Four homes cover almost everything: object storage for files and media, a relational database (Postgres) for records that must be correct, a friendly table tool (Airtable) for small team lists, and a vector store for searching by meaning.
  • ·The matching rule is simple: files go in object storage with only their description in the database; facts that change together go in Postgres; anything a non-technical team manages alone can live in Airtable until it outgrows it.
  • ·Every one of these has a self-hostable version, so a regulated company can run the whole map inside its own network.

Every growing company hits the same wall. The contract is somewhere in email. The customer list is a spreadsheet with five conflicting copies. The scans live in a shared folder nobody dares reorganise. Then someone tries to automate a workflow and discovers the real problem: the data has no proper home. This guide gives you the four homes that cover practically every kind of business data, what belongs in each, and the rule for deciding.

The four homes

Object storage
For files and media: the warehouse
Stores PDFs, scans, images, audio, video, backups
Examples Amazon S3, Cloudflare R2; MinIO to self-host
Rule The file lives here; only its description lives in the database
PostgreSQL
For records that must be correct: the ledger
Stores Customers, orders, invoices, approvals: facts that change together
Why it Transactions guarantee an order and its payment update together or not at all
Rule If two numbers must never disagree, they belong here
Airtable
For small team lists: the shared notebook
Stores Content calendars, candidate trackers, simple inventories
Why it Non-technical teams manage it alone: forms, views, automations
Rule Great until thousands of rows or money math; then graduate to Postgres
Vector store
For searching by meaning: the librarian
Stores Numerical fingerprints of text and images, for similarity search
Examples pgvector inside Postgres; Qdrant standalone
Rule When 'find documents about late delivery penalties' must work without exact words

How they work together: one invoice, four homes

Follow one scanned invoice through a real pipeline. The scan itself (a 4 MB image) goes to object storage. The extracted facts (supplier, amount, date, status) become a row in Postgres, pointing at the scan. A numerical fingerprint of the invoice text goes to the vector store, so next month someone can search "that maintenance invoice from the Jeddah supplier" and find it without remembering any exact word. And the operations team tracks the week's exceptions in an Airtable view fed from Postgres. Four homes, one document, zero copies of the truth.

The mistakes that cause the mess

  1. 1 Files inside the database
    Storing scans as database blobs bloats backups and slows everything. The file goes to object storage; the database keeps the link.
  2. 2 The spreadsheet that became the system
    A shared sheet with five editors is not a database: no history, no rules, no single truth. The day two copies disagree about a payment is the day you move it to Postgres.
  3. 3 Buying a search problem a database cannot solve
    Keyword search cannot find 'late delivery penalty' inside a contract that says 'compensation for delayed handover'. That is a meaning problem, and it needs vectors, which our deep dive on vector databases covers in full.
The self-hosted note

Every home on this map has a version that runs inside your own network: MinIO for object storage, Postgres with pgvector, and table tools like NocoDB in place of Airtable. If your regulator decides where data lives, the map does not change; only the hosting does.

Share

Put one workflow into production.

A 15-minute call, then a real assessment of what an agent can run on your own servers.

Book a scoping call →
Keep reading