Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Interesting statement here:

"We rewrote our data layer to treat the database as a simple persistence layer rather than an application. We eliminated all the triggers, stored procedures, and row-level security rules. That logic lives in the application now."

Reminds me of the article and discussion here[0] over whether to put logic in the database or not and to what degree.

[0] https://news.ycombinator.com/item?id=35643432 "Use Databases Without Putting Domain Logic in Them"



Also reminds me of this Martin Fowler post [0]:

"The situation becomes interesting when the vast majority of your data sits in a single logical database. In this case you have two primary issues to consider. One is the choice of programming language: SQL versus your application language. The other is where the code runs, SQL at the database, or in memory.

SQL makes some things easy, but other things more difficult. Some people find SQL easy to work with, others find it horribly cryptic. The teams personal comfort is a big issue here. I would suggest that if you go the route of putting a lot of logic in SQL, don't expect to be portable - use all of your vendors extensions and cheerfully bind yourself to their technology. If you want portability keep logic out of SQL."

[0] https://martinfowler.com/articles/dblogic.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: