2 ms·
Sorry but putting business code in databases is a terrible, terrible idea. (a) Oracle, Microsoft, Teradata etc all charge through the roof for scaling out your
by threeseed 12y ago
Sorry but putting business code in databases is a terrible, terrible idea.
(a) Oracle, Microsoft, Teradata etc all charge through the roof for scaling out your database. Which of course you're going to need to do if you're adding more and more business code. Scaling out normal code ? Cheap.
(b) What happens if you exceed the capabilities of your database (yes it happens). Then you have a major project on your hands migrating both data and code.
(c) The platform for developing/executing your business code in the database is like going back to the 1980s compared to the new flexible, microservices world we live in today. Really stored procedures over NodeJS, Scala, Go etc ? Performance isn't that important in businesses where most processes are batch orientated.
(d) Databases in businesses are as tightly controlled as they get. As a developer would you want to have to go through laborious change management processes every time you push a commit ? It would cripple software development teams.
There is a reason why "data lakes" are all the rage right now. Because people need cheap places to store and process their data and then use their SQL database simply for querying and reporting.
- brlewis 12y ago(a) http://aws.amazon.com/rds/postgresql/ http://aws.amazon.com/rds/postgresql/ (b) Can you give an example? (c) I don't understand what you're criticizing here. (d) This depends on the organization. But generally business logic that would be at home in the database is business logic that should be controlled as tightly as the data is.
- marcosdumay 12y ago(a) Yes, databases scale badly. You don't want to run your entire application there. Yet, code that reads a huge volume of data, calculates something based on parameters, and write it back to the DB will put more weight on your DB servers if it's run from the application layer; code that enforces the consistency of the data needs a strongly enforced policy if you keep it in any other place, but it works completely transparently if you place it in the database; code that denormalize the data will be much easier to use if you can run directly on your queries... (b) Been there, done that. Migrating code is EASY. Data is what's hard. (c) Is that a joke? Honestly, I can't tell. (d) That's more a reason to integrate those teams than to choose one place over the other. The programmers can disrupt the database on several ways without putting code there, and don't get any extra power by running their code in a different server. By the way, the data that was famously leaking recently was mostly from email and file servers...