Reply-To: "RSH" <RSH_Oracle@worldnet.att.net>
From: "RSH" <RSH_Oracle@worldnet.att.net>
Newsgroups: comp.databases.oracle.server
References: <3cd38e7f$1_1@news.iprimus.com.au>
Subject: Re: Embedded SQL
Lines: 60
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <PsdB8.6787$vT1.562415@bgtnsc04-news.ops.worldnet.att.net>
Date: Sun, 05 May 2002 16:54:07 GMT
NNTP-Posting-Host: 67.250.107.159
X-Complaints-To: abuse@worldnet.att.net
X-Trace: bgtnsc04-news.ops.worldnet.att.net 1020617647 67.250.107.159 (Sun, 05 May 2002 16:54:07 GMT)
NNTP-Posting-Date: Sun, 05 May 2002 16:54:07 GMT
Organization: AT&T Worldnet


I do not understand your question. They are two different things.

Embedded SQL is used where structures do not change and you routinely grab
or manipulate the same data from the same tables all the time.

For example, PRO*C and using embedded SQL there might be suitable for use in
remittance processing, other financial batch processing, or as called
routines for other activities. If you have lots of schema change activity,
it would not be as pleasant.

PL/SQL (Oracle's own database - centric procedural language) is a little
more forgiving with %ROWTYPEs and such, plus the fact that if an object it
depends on is changed , or it is changed, the dependency chain becomes
invalid, because the code is stored in the database. That has been a
lifesaver.

Dynamic SQL can be used in PL/SQL programs and elsewhere; it adds some
potentially dangerous issues including some security concerns and the
potential for poorer documentation (as a string could be composed and
submitted with no hint of what it might be or do, and little in the code
other than the buffer constructs to hold it).

Dynamic SQL can perform DDL (Data Definition Language) operations; embedded
SQL does DML (Data Manipulation Language) operations, and in addition is
more or less bound to object naming build into the program at the time of
its construction.

DSQL is handy for utility operations that might have to deal with multiple
schema owners, objects, and object types. ESQL (not the Informix ESQL) more
confined in their scope and that are used to perform traditional DML
(insert, update, delete..).

DSQL can be used to truncate or drop tables, or nearly anything that the DML
or DDL classes of SQL are used for.

The most common DSQL use I've seen are utilities for truncating tables,
which is a DDL operation, not DML (the nearest equivalent DML would be
'delete from...'m which does have huge overhead.)

Hope this helps.

RSH.

"Sted Alana" <Sted_Alana@hotmail.com> wrote in message
news:3cd38e7f$1_1@news.iprimus.com.au...
> Whats the point of embedded SQL? and how is it related to dynamic SQL?
>
> Thanks.
>
> --
> N e w s N e t  C u s t o m e r
> E - m a i l :  sted.alana@hotmail.com
>
>
>
>
>
>



