SQL in application programs: Embedded SQL, API (Application program interface)

SQL can be used in application programs in 2 different ways:

1) Embedded SQL: In this process SQL is embedded in to other programs directly. Along with other programs SQL is mixed and it is executed together with other programming languages. A special pre-compiler is used for this purpose.

For Example:

  • In MySQL: It doesn’t support embedded SQL.
  • In Oracle: C, COBOL (COmmon Business Oriented Language), FORTRAN, Pascal, PL/I (Programming Language One), Java
  • In Sybase: C, COBOL
  • In DB2: APL, Assembler, BASIC (Beginner’s All-purpose Symbolic Instruction Code), COBOL, FORTRAN, Java, PL/I
  • In Informix: C, COBOL
  • In Microsoft SQL Server: C

2) API (Application program interface): API is a set of function calls. It is used by the application program to communicate with the database management system.

For Example:

  • In MySQL: C API (Common Application Programmer’s Interface), ODBC (Open Database Connectivity), JDBC (Java Database Connectivity), Perl, PHP, Tcl (Tool Command Language).
  • In Oracle: OCI (Oracle Call Interface), ODBC, JDBC
  • In Sybase: dblib (DB Library), ODBC, JDBC
  • In DB2: ODBC, JDBC
  • In Informix: ODBC, JDBC
  • In Microsoft SQL Server: dblib (DB Library), ODBC

Leave a Reply