Every software Application has a business logic associated with it.Change in business logic is regular and inevitable activity. But Some times change is like a knock on Devil’s door and results could be catastrophic. So there are discussions about placement of business logic in Classes(Layer) of Web/Windows applications or in SQL/PL-SQL in form of Stored Procedures/User Defined functions. Both Approaches have their own Pros and Cons. We will discuss both of them one by one.

  • Business logic at SQL(PL\SQL) LevelIn this approach the Business logic is kept mainly at SQL level in form of Stored Procedures or User Defined Functions.
    • Pros:
      • The process to change business logic is easy as we have to have the logic in Stored Procedure or Functions, it doesn’t require change in Business Logic implemented in our application
    • Cons:
      • Implementation of Business logic is little difficult task as compared to handle in .net/Java etc.
  • Business logic at Business Layer of ApplicationIn this approach the business logic is kept at Application level in form of Class or APIs or DLLs
      • Pros:

    It easy to code business logic as compared to SQL. Manipulation is always better at JAVA/.net end.

    • Cons:
      • The process to accommodate change is difficult as compared to changes at SQL level.
      • Change can induce errors at different levels in application.