3 ms·
> But if we use ORMs, they're "services" we can swap, right? Sort of? That's the dream, but often the answer is "no, not even sort of". Plenty of companies wi
by Hermitian909 4y ago
> But if we use ORMs, they're "services" we can swap, right? Sort of?
That's the dream, but often the answer is "no, not even sort of".
Plenty of companies with super smart and experienced engineers laying the DB foundations for a company early in its life have failed at this goal. A few problems come into effect, two immediately spring to mind:
1. Eventually some engineer comes along with a reasonably compelling business case to either pass by the abstraction layer, or extend it so that it's no longer general (e.g. now it only works for Postgres).
2. As the company scales Hyrum's law comes into effect and a thousand pieces of code come to have subtle dependencies on implementation details of the DB.
(2) is particularly hard to avoid because DBs are often at least the nominal source of performance bottlenecks and engineers will do almost anything to make performance acceptable no matter how horribly it wrecks abstraction layers.