Re:What ORMs have taught me: just learn SQL (2014)
by snuxoll on Monday June 27, 2016 @04:11AM
(#11984794)
I try to avoid anything but mapping or querying data in sprocs, but sometimes they are a better place to put logic that is needed to ensure consistency. Your database will outlive your application, or you will eventually need to integrate data from a third party system - as a result your database engine is always the last line of defense to protect your data, and if that means using a sproc than so be it. I'll admit, I've written some business logic into stored functions in PostgreSQL, but it's mostly a background job to update cached data because it is much faster to do it in the database than pulling a bunch of records down to a service and sending them back up.
[ Parent
| on HN ]
There are no comments on this comment yet.