Re: little off-topic: stored procedures

From: Curt Sampson <cjs(at)cynic(dot)net>
To: Clinton Adams <clinton(at)vote-smart(dot)org>
Cc: Felipe Schnack <felipes(at)ritterdosreis(dot)br>, pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: little off-topic: stored procedures
Date: 2002-09-11 05:02:25
Message-ID: Pine.NEB.4.44.0209111400290.24427-100000@angelic.cynic.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)cynic(dot)net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Barry Lind 2002-09-11 05:43:57 Re: NULL Blob column error - PATCH FIX
Previous Message Curt Sampson 2002-09-11 03:06:31 Re: [JDBC] problem with new autocommit config parameter