Code in database vs. code in application
            
            
                
                    
                        https://brandur.org/fragments/code-database-vs-app
                    
                    
                        
                        
                            ·
                        
                        In which we address the perennial question of when it’s appropriate to push domain logic into database stored procedures and triggers versus keeping it at the application layer.