3 ms·
My belief is if you can feasibly write your app with an ORM then you should just use Postgres. If you can't, because you need $feature that the ORM doesn't mana
by gaius 11y ago
My belief is if you can feasibly write your app with an ORM then you should just use Postgres. If you can't, because you need $feature that the ORM doesn't manage, then buy the most powerful database you can afford and actively look for opportunities to exploit every bit of the functionality that you've paid for. The truth is being database agnostic is wildly overrated; in practice any organization will go through 10 languages before they decide to change their database, and no-one in their right mind cares about designing an app that is "language agnostic". You wouldn't start out in a language that supports, I dunno, closures, then deliberately not use them just in case you wanted to switch to another language in a couple of years.
- kbenson 11y agoThat's a good point, and I mostly agree with it, but it's less true now than it was in the past. There's plenty of shops that switch around data stores for part of all of their data now. It may not be all that common to go from one SQL variant to another, but there are plenty of cases of people moving from SQL to NoSQL (and back or vice-versa). Think BigTable, Dynamo and Cassandra. That said, there's as little hope of being database agnostic in those situations as there is being language agnostic. Really, being SQL variant agnostic is like trying to make sure you stay away from language features that you can't rely on if you switch between a C/C++ implementation and JVM hosted implementation of the same language. It's relatively easy (in the context of what we are discussion in this conversation at least), and as such may be feasible to take advantage of the flexibility it gives you later.
- gaius 11y agoPerhaps a better example would be avoiding multiple inheritance not because you think MI is a bad idea but just in case you wanted to switch from C++ to Java in the future and you might need to re-architect.
- kbenson 11y agoMaybe, but I think it might be more apt to say "just in case you wanted to switch from C++ to Java in the future and you would prefer not to to re-architect." IMO I think this is mostly an enterprise (or a "we serve enterprises") sort of mindset, where they have existing, vetted systems, and being able to match those targets opens you up to more of the market. Is their code target C/C++ or the JVM? Is their target DB Oracle, DB2 or MSSQL. I can imagine having an app that could be deployed on both Oracle and MSSQL back-ends would greatly increase your markets due to ease of getting it vetted in some organizations, just as I can imagine not too far in the distant past having both JVM and C/C++ versions might have done the same (but I thing that's still inherently harder to do).