embedded SQL

SQL stands for Structured Query Language, it provides as a declarative query language. However, a general-purpose programming language requires to get access to the database because

  • SQL is not as powerful as any of the general purpose language available today.
  • There are many declarative actions such as interacting with the user sending the result to a GUI or printing a report which we cannot do using SQL.
  • There are many queries that we can express in C, Pascal, Cobol and many more but we cannot express in SQL.

This Embedded SQL a method for combining data manipulation capabilities of SQL and computing power of any programming language. Then embedded statements are in line with the program source code of the host language. The code of embedded SQL is parsed by a preprocessor which is also embedded and is replaced by the host language called for the code library it is then compiled via the compiler of the host.