Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Embedded SQL

Re: Embedded SQL

From: RSH <RSH_Oracle_at_worldnet.att.net>
Date: Sun, 05 May 2002 16:54:07 GMT
Message-ID: <PsdB8.6787$vT1.562415@bgtnsc04-news.ops.worldnet.att.net>

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_at_hotmail.com> wrote in message news:3cd38e7f$1_1_at_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_at_hotmail.com
>
>
>
>
>
>
Received on Sun May 05 2002 - 11:54:07 CDT

Original text of this message

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