Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 501861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:13:59+00:00 2026-05-13T06:13:59+00:00

For typical 3-tiered application, I have seen that in many cases they use a

  • 0

For typical 3-tiered application, I have seen that in many cases they use a lot of complex stored procedures in the database. I cannot quite get the benefit of this approach. In my personal understanding, there are following disadvantages on this approach:

  1. Transactions become coarse.
  2. Business logic goes into database.
  3. Lots of computation is done in the database server, rather than in the application server. Meanwhile, the database still needs to do its original work: maintain data. The database server may become a bottleneck.

I can guess there may be 2 benefits of it:

  1. Change the business logic without compile. But the SPs are much more harder to maintain and test than Java/C# code.
  2. Reduce the number of DB connection. However, in the common case, the bottleneck of database is hard disk io rather than network io.

Could anyone please tell me the benefits of using a lot of stored procedures rather than letting the work be done in business logic layer?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:13:59+00:00Added an answer on May 13, 2026 at 6:13 am

    Basically, the benefit is #2 of your problem list – if you do a lot of processing in your database backend, then it’s handled there and doesn’t depend on the application accessing the database.

    Sure – if your application does all the right things in its business logic layer, things will be fine. But as soon as a second and a third application need to connect to your database, suddenly they too have to make sure to respect all the business rules etc. – or they might not.

    Putting your business rules and business logic in the database ensures that no matter how an app, a script, a manager with Excel accesses your database, your business rules will be enforced and your data integrity will be protected.

    That’s the main reason to have stored procs instead of code-based BLL.

    Also, using Views for read and Stored Procs for update/insert, the DBA can remove any direct permissions on the underlying tables. Your users do no longer need to have all the rights on the tables, and thus, your data in your tables is better protected from unadvertent or malicious changes.

    Using a stored proc approach also gives you the ability to monitor and audit database access through the stored procs – no one will be able to claim they didn’t alter that data – you can easily prove it.

    So all in all: the more business critical your data, the more protection layer you want to build around it. That’s what using stored procs is for – and they don’t need to be complex, either – and most of those stored procs can be generated based on table structure using code generation, so it’s not a big typing effort, either.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Typical scenario: a class that a lot of people have worked on. I'd like
So in a typical model where you have a parent that can have many
I have a typical drill down style app with a DetailViewController that includes a
A typical CSS property that I use often is overflow-x or overflow-y . Sometimes
Typical jQuery over-use: $('button').click(function() { alert('Button clicked: ' + $(this).attr('id')); }); Which can be
A typical stored procedure in our system accepts around 20 or so parameters. There's
The typical Python threadpool will have a structure like this one: def run(self): while
My typical workflow is that I develop on localhost, but with Google Apps Marketplace
in typical PHP applications I used to use mysql_real_escape_string before I did SQL inserts.
In a typical organization application i create, entities User , Projects , Company ,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.