Hacker News new | ask | show | jobs
by codingdave 1299 days ago
Possible to do with one database, yes - Add JSON columns to your tables to hold tenant-specific metadata. Deal with it in your app layer.

But I'd re-think whether a single database is truly the right answer. What is driving you to that solution?

1 comments

The main reason: getting rid of synchronization/migration process for many databases.
What do you have to keep synchronized across tenants?

And is consistency across tenants really a hard requirement? Would an eventual consistency model work?

How does migration factor in? Do you mean migrating one database vs multiple databases?

What exactly would you be migrating? And if it’s written in code, migrating individual tenants one at a time, at your pace or when a particular tenant is ready to migrate, might be a feature and not a bug.