Embedded SQL

Definition & Meaning

Last updated 22 month ago

What is Embedded SQL?

Embedded SQL is a technique of putting inline SQL Statements or queries into the Code of A Programming Language, that is known as a Host language. Because the host language can not Parse SQL, the Inserted SQL is parsed by an embedded SQL preProcessor.

Embedded SQL is a sturdy and convenient Method of mixing the Computing power of a Programming Language with SQL’s specialised facts management and manipulation competencies.

What Does Embedded SQL Mean?

Embedded SQL is not supported by means of all Relational Database management structures (RDBMS). Oracle DB and PostgreSQL offer embedded SQL assist. MySQL, Sybase and SQL Server 2008 do now not, despite the fact that aid was provided by way of earlier versions of SQL Server (2000 and 2005).

The C Programming Language is generally used for embedded SQL Implementation. For Instance, a commercial bank’s inFormation Device (IS) has a front-quit consumer Interface created within the C language, and the IS interfaces with a again-give up Oracle DB Database. One of the front-cease interface Modules lets in brief Viewing and commission calculation for sales Agents throughout targeted intervals. An inefficient technique to coPing with this manner might be to shop every fee fee in a Database Table. However, a more powerful answer is to calculate and go back commission values based totally on specific user requests on specific dates. The utility accomplishes this by embedding a SQL question inside the C code, as follows:

SELECT zero.2*SALE_AMount FROM TOTAL_SALES WHERE SALE_DATE=’MM/DD’YYYY’ AND AGENT_NO=xx

In this example, the SQL announcement calculates and returns 20 percent of the sale quantity from a TOTAL_SALES table, while the person is predicted to input the SALE_DATE and AGENT_NO values. This SQL question is then inserted inLine Into the C code of the the front-cease module. The C code and SQL Query work collectively to deliver seamless consumer outcomes.

Share Embedded SQL article on social networks

Your Score to Embedded SQL article

Score: 5 out of 5 (1 voters)

Be the first to comment on the Embedded SQL

3551- V5

tech-term.com© 2023 All rights reserved