Wednesday, June 2, 2010

Why should use Stored Procedures

In software development its very common to interact with Database(s) and Application Layer used to fetch data from DB using any programming language like java, C# conjunction with SQL.
There are two kind of DB languages
1) SQL : Non procedural language, where you can not write your own logic / subroutines.
2) PL/SQL: Procedural language, where you can write business logic and subroutines.

Stored procedures used where we would require the following
* modular programming at DB level
* Faster execution.
* Reduce network traffic.
* Security mechanism.

Advantages:

->You can modify stored procedures independently of the program source code.The application doesn't have to be recompiled when/if the SQL is altered.
->Stored procedures abstract or separate server-side functions from the client-side.
->Stored procedures allow a lot more flexibility offering capabilities such as conditional logic.
->Stored procedures are stored within the databse and run directly in database engine, bandwidth and execution time are reduced. This is because a single stored procedure can execute a complex set of SQL statements.

Disadvantages:

->If we need to modify anything in stored procedure then its definition has to be replaced.
->Any changes in the stored procedure will impact all the places whereever this procedure is used.

How to create :
http://download.oracle.com/docs/html/B16022_01/ch3.htm
Examples in java:
http://www.oracle.com/technology/sample_code/tech/java/jsp/oracle9ijsp.html

12 comments:

  1. Thanks a lot for sharing....
    its really beneficial...

    ReplyDelete
  2. Thanks a lot very much for the high quality and results-oriented help. I won’t think twice to endorse your blog post to anybody who wants and needs support about this area.
    digital marketing training in marathahalli

    digital marketing training in rajajinagar

    Digital Marketing Training in online


    full stack developer training in pune


    full stack developer training in annanagar

    ReplyDelete
  3. Outstanding blog post, I have marked your site so ideally I’ll see much more on this subject in the foreseeable future.
    Python training in marathahalli
    AWS Training in chennai

    AWS Training in bangalore


    ReplyDelete
  4. Resources like the one you mentioned here will be very useful to me ! I will post a link to this page on my blog. I am sure my visitors will find that very useful
    Blueprism training in Pune

    Blueprism online training

    Blue Prism Training in Pune

    ReplyDelete
  5. I found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing.. Believe me I did wrote an post about tutorials for beginners with reference of your blog. 
    Data Science Training in Chennai
    Data science training in bangalore
    Data science online training
    Data science training in pune

    ReplyDelete
  6. I like your post. Everyone should do read this blog. Because this blog is important for all now I will share this post. Thank you so much for share with us.
    Nice information thanks for sharing it’s very useful. This article gives me so much information.
    Data Science Training In Chennai

    Data Science Online Training In Chennai

    Data Science Training In Bangalore

    Data Science Training In Hyderabad

    Data Science Training In Coimbatore

    Data Science Training

    Data Science Online Training

    ReplyDelete
  7. I was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post.
    data scientist training in hyderabad

    ReplyDelete
  8. I am always searching online for articles that can help me. There is obviously a lot to know about this. I think you made some good points in Features also. Keep working, great job
    data scientist course in hyderabad

    ReplyDelete
  9. Informative blog and knowledgeable content. If you want to become a data science training then follow the below link.
    Data Science Certification in Hyderabad

    ReplyDelete
  10. 360DigiTMG offers the best Data Science Courses on market. Enroll now for a bright future.
    best data science courses in chennai

    ReplyDelete