Re: little off-topic: stored procedures - Mailing list pgsql-jdbc

From Curt Sampson
Subject Re: little off-topic: stored procedures
Date
Msg-id Pine.NEB.4.44.0209111400290.24427-100000@angelic.cynic.net
Whole thread Raw
In response to Re: little off-topic: stored procedures  (Clinton Adams <clinton@vote-smart.org>)
Responses Re: little off-topic: stored procedures  (Laszlo Hornyak <hornyakl@rootshell.be>)
List pgsql-jdbc
On Tue, 10 Sep 2002, Clinton Adams wrote:

> I like having sql outside of the java code but i'm not crazy about stored
> procedures - you can check out an alternative approach to stored procedures
> and embedded sql at http://www.ibatis.com/jpetstore/jpetstore.html
>
> On Sun September 8 2002 11:35, Felipe Schnack graced us with the following -
> >   I'm right now choosing the design patterns for an web portal for an
> > academic institution. I just started a philosofical discussion about how we
> > will do database access. I was thinking about use stored procedures
> > extensively, but some people says me I should avoid them whenever possible,
> > and put the business logic in Java. What you all think about it?

Personally, I like having it right in the Java, for several reasons.

1. You don't have to go look into another file to see what's going on.

2. When you build your code, you know exactly what SQL will be running.
Otherwise you get whatever is in the database at that particular time,
which might be different from what you think it is.

3. Rolling it into production is generally easier, because you can
just roll out the Java stuff, without worrying about rolling out
new code into the database at the same time.

cjs
--
Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.netbsd.org
    Don't you know, in this new Dark Age, we're all light.  --XTC


pgsql-jdbc by date:

Previous
From: Curt Sampson
Date:
Subject: Re: [HACKERS] problem with new autocommit config parameter
Next
From: Barry Lind
Date:
Subject: Re: NULL Blob column error - PATCH FIX