DITTO THAT!!!

You can also use PL/SQL for selects, not just inserts, updates and deletes.
You do this by having the PL/SQL return a reference cursor and then the Java
code takes it from there to display everything via jsp or whatever. I was
DBA where we did this on a Java/Oracle development project. We had tons of
queries and NO EMBEDDED SQL in the Java code. I could change (tune) the SQL
queries in the PL/SQL packages without making any changes to the Java source
code. We also used some native dynamic SQL for the queries with lot's of
user interface driven permutations on the WHERE clause. This approach
requires duhvelopers to work closely with DBAs/database dweebs and...
depending on your demeanor, you can count this as a pro or a con. ;-)


Steve Orr


-----Original Message-----
Sent: Monday, January 14, 2002 9:01 AM
To: Multiple recipients of list ORACLE-L


Chris,

I personally think this is the best approach.  Think of the application
task:  

1). Is it easier to perform Database Processing within PL/SQL than within
Java?  PL/SQL is a very strong development tool.  Code development and
maintenance-wise, I think it is much easier to do all the work in PL/SQL
rather than in Java.
2). DB Tuning wise, this forces the application to always use bind variables
- a very good thing.
3).  Finally, it forces an application model to work in an n-tier model
where Java is doing the presentation (making pretty pictures & interfacing
with the db), and the database is doing what it does best - process the data
within the db engine.  Remember, of all the computers in the mix, the db
server is usually the strongest machine of the bunch - why not take
advantage of that power and make it do the db work.

Just my 2 cents.

Tom Mercadante
Oracle Certified Professional


-----Original Message-----
Sent: Monday, January 14, 2002 10:10 AM
To: Multiple recipients of list ORACLE-L


I just joined a new Oracle/Java project using Tomcat app server.  On this
project they decided to create an update procedure and insert procedure for
every table.  This procedure is then called in the Java code with the
appropriate parameters passed, instead of simply coding the UPDATE or INSERT
SQL directly in Java.  

Does anyone else take this approach?  I'm trying to understand the pros vs
cons of this approach.  

TIA!!!

Chris
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Grabowy, Chris
  INET: [EMAIL PROTECTED]
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Orr, Steve
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to