3 ms·
If you are putting business logic in your database, you are doing it wrong. I get your point. Which is why I said it’s sometimes ok to run with raw sql with you
by gabereiser 5y ago
If you are putting business logic in your database, you are doing it wrong. I get your point. Which is why I said it’s sometimes ok to run with raw sql with your orm. The problem is your database is really great at storing and retrieving data. Keep it doing what it’s good at and do your aggregate work on a separate machine where you have cpu cycles to spare. This is the point. I’ve told people before about hibernate and it’s foreign key constraints on models - “sometimes is best to not define the relationship at the model and just make another trip to the database to load”. Heavily utilized databases are a bottleneck to your systems, stop making them do the work. Do it on the edge.