title: What is the best approach for high scaled system - DB procedure or Programming logic
body: <p>I am really caught into a puzzle.</p>
  
  <p>We use some language (java / php /python) as mediator between the frontend and db. We use JPA / hibernate to smooth this data flow. If we check with any DBA, most of the data processing, calculations, job processing can be done directly at db side with help of procedure or triggers that too with good scalability. Same thing if handled at java / php side it takes rather longer time and again issue might come up with scalability as transaction handling is not much straight forward.</p>
  
  <p>What I want to clear about my thought is : 1] is it really better / right approach to handle most possible logic with DB procedures ( like handling big chunk of processing impacting many tables ) ? 2] Can scalability be acheivied with DB which can't be with Coding? 3] Is there any better way to look at this DB and Coding relation ?</p>
  
  <p>Thanks in advance.</p>
  
  <p>Regards</p>