- Embedded SQL
Embedded SQL is a method of combining the
computing power of aprogramming language and thedatabase manipulation capabilities ofSQL . Embedded SQL statements are SQL statements written inline with the programsource code of the host language. The embedded SQL statements are parsed by an embedded SQLpreprocessor and replaced by host-language calls to a code library. The output from the preprocessor is then compiled by the hostcompiler . This allows programmers to embed SQL statements in programs written in any number of languages such as: ,COBOL andFortran .The
ANSI SQL standards committee defined the embedded SQL standard in two steps: a formalism called Module Language was defined, then the embedded SQL standard was derived from Module Language.cite web
url=http://download.oracle.com/docs/cd/B10501_01/appdev.920/a58231/ch1.htm#2889
title=The Module Language Concept
work=SQL*Module for Ada Programmer's Guide, Release 8.0, Chapter 1. Introduction to SQL*Module
publisher=Oracle Corporation
accessdate=2008-07-14] The SQL standard defines embedding of SQL as "embedded SQL" and the language in which SQL queries are embedded is referred to as the "host language". A popular host language is C. The mixed C and embedded SQL is calledPro*C in Oracle andSybase database management systems. In thePostgreSQL database management system this precompiler is calledECPG . Other embedded SQL precompilers are Pro*Ada, Pro*COBOL, Pro*FORTRAN, Pro*Pascal, and Pro*PL/I .Support
Oracle Corporation Ada
Pro*Ada was officially desupported by Oracle in version 7.3. Starting with Oracle8, Pro*Ada has been replaced by SQL*Module but appears to have not been updated since. [cite web
url=http://download.oracle.com/docs/cd/B10501_01/server.920/a96530/migcompa.htm#1010868
title=Ada Support in Version 8
work=Oracle9i Database Migration, Release 2 (9.2), Chapter 5. Compatibility and Interoperability
publisher=Oracle Corporation
accessdate=2008-07-14] SQL*Module is a module language that offers a different programming method from embedded SQL. SQL*Module supports the Ada83 language standard for Ada.C/C++
Pro*C became Pro*C/C++ with Oracle8. Pro*C/C++ is currently supported as of Oracle Database 11"g".
COBOL
Pro*COBOL is currently supported as of Oracle Database 11"g".
Fortran
Pro*FORTRAN is no longer updated as of Oracle8 but Oracle will continue to issue patch releases as bugs are reported and corrected.
Pascal
Pro*Pascal was not released with Oracle8.
PL/I
Pro*PL/I was not released with Oracle8. The "Pro*PL/I Supplement to the Oracle Precompilers Guide", however, continues to make appearances in the Oracle Documentation Library (current as of release 11"g").cite web
url=http://download.oracle.com/docs/cd/A64702_01/doc/server.805/a58232/ch01.htm#505
title=Language Alternatives
work=Pro*COBOL Precompiler Programmer's Guide, Release 8.0, Chapter 1. Introduction
publisher=Oracle Corporation
accessdate=2008-07-14]PostgreSQL C/C++
ECPG is part of PostgreSQL since version 6.3.
See also
Pro*C/C++ c++References
External links
* [http://infolab.stanford.edu/%7Eullman/fcdb/oracle/or-proc.html Introduction to Pro*C Embedded SQL]
* [http://www.oreillynet.com/pub/a/databases/2006/12/07/embedded-sql-with-pro-c.html Embedded SQL with Pro*C]
* [http://tahiti.oracle.com/pls/db92/db92.show_toc?partno=a58231 SQL*Module for Ada Programmer's Guide, Release 8.0]
* [http://www.postgresql.org/docs/8.3/interactive/ecpg.html ECPG, PostgreSQL 8.3 Documentation]
Wikimedia Foundation. 2010.