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: update statement PL/SQL

Re: update statement PL/SQL

From: Paul <paulsnewsgroups_at_hotmail.com>
Date: Fri, 29 Apr 2005 14:35:56 +0100
Message-ID: <4rd471te3h9f98apoqubhlam66uhjg6i6n@4ax.com>

Serge Rielau <srielau_at_ca.ibm.com> wrote:

>> Sorry, I may be confused here - am trying to learn PL/SQL. The book
>> Learning Oracle PL/SQL by Bill Pribyl with Steven Feuerstein makes use
>> of cursors - what's so bad about them?

>In a nutshell a cursor is an API that connects the relation model of SQL
>with the procedural model. Whenever you cross models there's an
>impedance mismatch.
>Statistically developers learn procedural concepts first (VB, C, Java,
>..) and have a hard time internalizing relational concepts, so they tend
>to code procedural.
>However RDBMS shine in relational optimization and execution. So using
>an excess of procedural code (resulting in many cursors) is an indicator
>for bad exploitation of the RDBMS.

But Daniel wrote "almost never" - surely there are times when it is necessary to trawl through a result set and modify/process the data in some way. Of course one can do this programatically

Query1.first
while not Query1.end
begin
  processing here;
  Query1.next;
end;

or in a stored proc on the server. I would like to understand why this sort of logic "almost never" applies to Oracle.

Paul...

>Serge

-- 

plinehan __at__ yahoo __dot__ __com__

XP Pro, SP 2, 

Oracle, 9.2.0.1.0 (Enterprise Ed.)
Interbase 6.0.2.0;

When asking database related questions, please give other posters 
some clues, like operating system, version of db being used and DDL.
The exact text and/or number of error messages is useful (!= "it didn't work!").
Thanks.
 
Furthermore, As a courtesy to those who spend 
time analyzing and attempting to help, please 
do not top post.
Received on Fri Apr 29 2005 - 08:35:56 CDT

Original text of this message

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