Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Do you use PL/SQL

Re: Do you use PL/SQL

From: <zigzagdna_at_yahoo.com>
Date: 22 May 2007 14:42:08 -0700
Message-ID: <1179870128.018634.219100@p77g2000hsh.googlegroups.com>


On May 22, 12:19 pm, "mfuller..._at_gmail.com" <mfuller..._at_gmail.com> wrote:
> On May 19, 11:44 pm, zigzag..._at_yahoo.com wrote:
>
>
>
>
>
> > On May 19, 11:02 pm, Doug Davis <douglass_da..._at_earthlink.net> wrote:
>
> > > I will be teaching a PL/SQL class, and I wanted to get some opinions.
> > > I read about PL/SQL, but wanted some practical advice from people who
> > > have used it.
>
> > > 1. Why use PL/SQL instead of just sending SQL queries from a program
> > > written in a procedural language on the client side (Java, Visual
> > > Basic, C++, anything.)
>
> > > 2. What are some examples of "real-world" things that you have done
> > > with PL/SQL (or have heard some one do with PL/SQL?)
>
> > > thanks.
>
> > > --http://www.douglassdavis.com
>
> > If you know Java or C++, you are better of using them than using PL/
> > SQL. Computers run so fast that performance advantages gained by PL/
> > SQL over C++ or Java are very little. On the other hand, if you do not
> > know these languages or do not want to write lot of code in them use
> > PL/SQL. PL/SQL you can write database centric programs quickly (lot
> > less lines of code than JAVA or C++). JAVA or C++ , however, are not
> > limited to calling SQL, you can do lot more things. If you are a
> > software engineer, have complex big software projects, use Java or C+
> > +. On the other hand if you want to write database centric programs
> > quickly write them in PL/SQL.
>
> > Certain activity such as writing triggers etc can be best done only
> > using PL/SQL blocks. Event, tough Java in theory can be called from
> > triggers (using Java stored procedures), one has to write convoluted
> > code to do it (you still write lots of PL/SQL code).
>
> Ok, from personal experience I have to disagree. However, I am willing
> to be open minded. Do you have any kind of data to support this? Some
> examples how the performance is improved enough by using a procedural
> language that it makes sense to move the business logic out to a
> different tier?
>
> Mike Fullerton- Hide quoted text -
>
> - Show quoted text -

Businees logic is not moved to another tier/server. All you do is to have your business logic on database server. All one does is to make JDBC connection from DB server to database on DB server. Also, one can do JDBC connection pooling. I have worked on many projects where we do not write any business logic in stored procedures because stored procedures cannot call any of the project libraries written in a language different from PL/SQL. Also, developers write business logic in Java or C++ classes which are easier to reuse (inehritance etc). There were anever any performance issues which impact users. Performance issues occur when one writes inefficient quieries and not when one writes code in JDBC or C++/Por*C vs PL/SQL. This has been done many many times. Received on Tue May 22 2007 - 16:42:08 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US