Embedded SQL: Difference between revisions

Content deleted Content added
Undid revision 689026279 by Spgennard (talk) ad
Cleanup and ad removal
Line 1:
'''Embedded SQL''' is a method of combining the [[computing]] power of a [[programming language]] and the [[database]] [[Data Manipulation Language|manipulation]] capabilities of [[SQL]]. Embedded SQL [[statement (programming)|statements]] are SQL statements written inline with the program [[source code]] of the host language. The embedded SQL statements are [[parsing|parsed]] by an embedded SQL [[preprocessor]] and replaced by host-language [[call site|calls]] to a code [[library (computing)|library]]. The output from the preprocessor is then compiled by the host [[compiler]]. This allows programmers to embed SQL statements in programs written in any number of languages such as [[:Category:C programming language family|C/C++]], [[COBOL]] and [[Fortran]]. This differs from SQL-derived programming languages that don't go through discrete preprocessors, such as [[PL/SQL]] and [[Transact-SQL|T-SQL]].
 
The 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.<ref name="modulelang">
Line 8:
|publisher=[[Oracle Corporation]]
|accessdate=2008-07-14}}
</ref> 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. TheHost mixedlanguage C and embedded SQL, for example, is called [[Pro*C]] in [[Oracle Database|Oracle]] and [[Sybase]] database management systems. In the [[PostgreSQL]] database management system this precompiler is calledand [[ECPG]]. Otherin embeddedthe SQL precompilers are Pro*[[Ada (programming language)|AdaPostgreSQL]], Pro*COBOL,database Pro*FORTRAN,management Pro*[[Pascal (programming language)|Pascal]], and Pro*[[PL/I]]system.
 
== Systems that support Embeddedembedded SQL ==
 
=== MySQLAltibase ===
; C/C++
: APRE is an embedded SQL precompiler provided by [[Altibase]] Corp. for its DBMS server.
 
=== IBM DB2 ===
Line 21 ⟶ 25:
}}</ref>
 
=== SAPMicrosoft SybaseSQL Server ===
; C/C++
SAP Sybase ASE 15.7 supports Embedded SQL for C and COBOL as part of the Software Developer Kit [[Sybase]].<ref>{{cite web
: Embedded SQL for C has been deprecated as of [[Microsoft SQL Server]] 2008 although earlier versions of the product support it.<ref>{{cite web
|url=http://www.sybase.com/products/allproductsa-z/softwaredeveloperkit/embeddedsql|title=EmbeddedSQL
|url=http://msdn.microsoft.com/en-us/library/ms143729.aspx
|work=SAP Sybase Products
|title=Deprecated Database Engine Features in SQL Server 2008
|publisher=SAP Sybase
|work=SQL Server 2008 Books Online (March 2009)
|accessdate=2012-09-05
|publisher=[[Microsoft]]
|accessdate=2009-04-10
}}</ref>
 
=== Oracle CorporationDatabase ===
SAP Sybase SQL Anywhere supports Embedded SQL for C and C++ as part of the SQL Anywhere database management system [[SQL Anywhere]].<ref>{{cite web
; [[Ada (programming language)|Ada]]
|url=http://www54.sap.com/pc/tech/database/software/sybase-sql-anywhere/index.html|title=SAP Sybase SQL Anywhere
; Ada : Pro*Ada was officially desupported by [[Oracle Corporation|Oracle]] in version 7.3. Starting with Oracle8, Pro*Ada haswas been replaced by SQL*Module but appears to have not been updated since.<ref>{{cite web
|work=SAP Sybase Products
|publisher=SAP Sybase
|accessdate=2013-05-02
}}</ref>
 
SAP Sybase IQ supports Embedded SQL for C and C++ as part of the Sybase IQ database management system [[Sybase IQ]].<ref>{{cite web
|url=http://www54.sap.com/pc/tech/database/software/sybase-iq-big-data-management/index.html|title=SAP Sybase IQ
|work=SAP Sybase Products
|publisher=SAP Sybase
|accessdate=2013-05-02
}}</ref>
 
=== Oracle Corporation ===
; Ada : Pro*Ada was officially desupported by [[Oracle Corporation|Oracle]] in version 7.3. Starting with Oracle8, Pro*Ada has been replaced by SQL*Module but appears to have not been updated since.<ref>{{cite web
|url=http://download.oracle.com/docs/cd/B10501_01/server.920/a96530/migcompa.htm#1010868
|title=Ada Support in Version 8
Line 51 ⟶ 44:
|accessdate=2008-07-14
}}</ref> 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''.
; C/C++
; COBOL : Pro*COBOL is currently supported as of Oracle Database 11''g''.
; C/C++ : [[Pro*C]] became Pro*C/C++ with Oracle8. Pro*C/C++ 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.<ref name="langalts"/>
 
; Pascal : Pro*Pascal was not released with Oracle8.<ref name="langalts"/>
; COBOL
; PL/I : Pro*PL/I was not released with Oracle8. The ''Pro*PL/I Supplement to the Oracle Precompilers Guide'', however, continued to make appearances in the Oracle Documentation Library until release 11''g''. As of release 12c, the Pro*PL/I has been removed from the Oracle Documentation Library.<ref name="langalts">{{cite web
; COBOL : Pro*COBOL is currently supported as of Oracle Database 11''g''.
 
; Fortran
; Fortran : Pro*FORTRAN is no longer updated as of Oracle8 but Oracle will continue to issue patch releases as bugs are reported and corrected.<ref name="langalts"/>
 
; [[Pascal (programming language)|Pascal]]
; Pascal : Pro*Pascal was not released with Oracle8.<ref name="langalts"/>
 
; [[PL/I]]
; PL/I : Pro*PL/I was not released with Oracle8. The ''Pro*PL/I Supplement to the Oracle Precompilers Guide'', however, continued to make appearances in the Oracle Documentation Library until release 11''g''. As of release 12c, the Pro*PL/I has been removed from the Oracle Documentation Library.<ref name="langalts">{{cite web
|url=http://download.oracle.com/docs/cd/A64702_01/doc/server.805/a58232/ch01.htm#505
|title=Language Alternatives
Line 69 ⟶ 72:
: [http://www.cobol-it.com Cobol-IT] is now distributing a COBOL precompiler for PostgreSQL
 
=== AltibaseSAP Sybase ===
SAP Sybase ASE 15.7 supports Embeddedembedded SQL for C and COBOL as part of the Software Developer Kit [[Sybase]].<ref>{{cite web
; C/C++
|url=http://www.sybase.com/products/allproductsa-z/softwaredeveloperkit/embeddedsql|title=EmbeddedSQL
: APRE is an embedded SQL precompiler provided by [[Altibase]] Corp. for its DBMS server.
|work=SAP Sybase Products
 
|publisher=SAP Sybase
=== Data Access Corporation ===
|accessdate=2012-09-05
With DataFlex 3.2 and Visual DataFlex you can pass SQL statements via one of the Data Access CLI connectivity kits to Microsoft SQL Server, IBM DB2 or any ODBC supporting database. The results can be retrieved and processed.
}}</ref>
 
=== Microsoft SQL Server ===
; COBOL
: [http://www.cobol-it.com Cobol-IT] is distributing a Embedded SQL precompiler for COBOL.
 
=== MySQL ===
; COBOL
: [http://www.cobol-it.com Cobol-IT] is distributing a Embedded SQL precompiler for COBOL.
 
== Systems that do not support Embedded SQL ==
 
SAP Sybase SQL Anywhere supports Embeddedembedded SQL for C and C++ as part of the SQL Anywhere database management system [[SQL Anywhere]].<ref>{{cite web
=== Microsoft SQL Server ===
|url=http://www54.sap.com/pc/tech/database/software/sybase-sql-anywhere/index.html|title=SAP Sybase SQL Anywhere
Embedded SQL for C has been deprecated as of [[Microsoft SQL Server]] 2008 although earlier versions of the product support it.<ref>{{cite web
|work=SAP Sybase Products
|url=http://msdn.microsoft.com/en-us/library/ms143729.aspx
|publisher=SAP Sybase
|title=Deprecated Database Engine Features in SQL Server 2008
|accessdate=2013-05-02
|work=SQL Server 2008 Books Online (March 2009)
|publisher=[[Microsoft]]
|accessdate=2009-04-10
}}</ref>
 
SAP Sybase IQ supports Embeddedembedded SQL for C and C++ as part of the Sybase IQ database management system [[Sybase IQ]].<ref>{{cite web
=== MySQL ===
|url=http://www54.sap.com/pc/tech/database/software/sybase-iq-big-data-management/index.html|title=SAP Sybase IQ
[[MySQL]] does not support Embedded SQL.
|work=SAP Sybase Products
|publisher=SAP Sybase
|accessdate=2013-05-02
}}</ref>
 
== Embedded SQL through ___domain-specific languages ==
Line 105 ⟶ 101:
== See also ==
* [[Language binding]]
* [[PL/SQL]]
* [[Pro*C/C++]]
* [[SQL/OLB]]
* [[SQL PL]]
* [[Transact-SQL]]
 
== References ==