3 ms·
Is there anything wrong with doing all your work in the database, other than the version control/deployment complications?
by catmanjan 6y ago
Is there anything wrong with doing all your work in the database, other than the version control/deployment complications?
- paledot 6y agoScaling. You can autoscale app servers by orders of magnitude, no sweat. Database replicas require much more logistical overhead and provide diminishing returns. The less demand your app places on a database overall, the more scalable it will be. (Of course, running a whole lot of simple queries can be more expensive in the grand scheme of things than one big query, so there's no one-size-fits-all solution to that principle.)
- emgo 6y agoOne thing I saw at a company I worked for, although it's tangential to technical concerns and more of an anecdote, were political ones. A small team of sysadmins was maintaining a set of very large queries that had grown organically over time, to the point that some of those queries where 20,000 lines. As you know, database queries don't scale as gracefully as code in size, because there's no modules, namespaces, classes, and so on. It's easier to distribute different parts of an application to different people/teams than it is to distributes parts of a database query. Only those sysadmins knew the queries ins and outs and could evolve those queries to the ever-changing business needs. They had an internal monopoly, which gave them a lot of political power over the organization and became a problem over time.