Embedded SQL

Định nghĩa Embedded SQL là gì?

Embedded SQLSQL nhúng. Đây là nghĩa tiếng Việt của thuật ngữ Embedded SQL – một thuật ngữ thuộc nhóm Technology Terms – Công nghệ thông tin.

Độ phổ biến(Factor rating): 5/10

Embedded SQL là một phương pháp chèn báo cáo inline SQL hoặc truy vấn vào mã của một ngôn ngữ lập trình, được biết đến như một ngôn ngữ sở tại. Bởi vì ngôn ngữ chủ không thể phân tích cú pháp SQL, SQL chèn được phân tách bởi một nhúng SQL preprocessor.Embedded SQL là một phương pháp mạnh mẽ và thuận tiện của việc kết hợp sức mạnh tính toán của một ngôn ngữ lập trình với khả năng quản lý dữ liệu và thao tác chuyên SQL của.

Xem thêm: Thuật ngữ công nghệ A-Z

Giải thích ý nghĩa

SQL nhúng không được hỗ trợ bởi tất cả các hệ quản trị cơ sở dữ liệu quan hệ (RDBMS). Oracle DB và PostgreSQL cung cấp hỗ trợ nhúng SQL. MySQL, Sybase và SQL Server 2008 không, mặc dù hỗ trợ được cung cấp bởi các phiên bản trước của SQL Server (2000 và 2005) ngôn ngữ lập trình C .Công thường được sử dụng để thực hiện SQL nhúng. Ví dụ, hệ thống thông tin ngân hàng thương mại của (IS) có một giao diện người dùng front-end tạo bằng ngôn ngữ C, và LÀ giao diện với một back-end cơ sở dữ liệu Oracle DB. Một trong những module giao diện front-end cho phép xem nhanh và tính toán hoa hồng cho đại lý bán hàng trong thời gian quy định. Một cách tiếp cận hiệu quả để xử lý quá trình này sẽ được lưu trữ mỗi giá trị hoa hồng trong một bảng cơ sở dữ liệu. Tuy nhiên, một giải pháp hiệu quả hơn là để tính toán và giá trị hoa hồng trở lại dựa trên yêu cầu người dùng duy nhất vào những ngày nhất định. Ứng dụng này thực hiện việc này bằng cách nhúng một truy vấn SQL trong mã C, như sau: SELECT 0,2 * SALE_AMOUNT TỪ TOTAL_SALES ĐÂU SALE_DATE = ‘MM / DD’YYYY’ VÀ AGENT_NO = xxIn ví dụ này, sẽ tính toán câu lệnh SQL và trả 20 phần trăm lượng bán từ một bảng TOTAL_SALES, khi người dùng đang mong đợi để nhập các giá trị SALE_DATE và AGENT_NO. sau đó truy vấn SQL này được chèn inline vào mã C của các module front-end. Mã C và việc truy vấn SQL với nhau để mang lại kết quả sử dụng liền mạch.

What is the Embedded SQL? – Definition

Embedded SQL is a method of inserting inline SQL statements or queries into the code of a programming language, which is known as a host language. Because the host language cannot parse SQL, the inserted SQL is parsed by an embedded SQL preprocessor.Embedded SQL is a robust and convenient method of combining the computing power of a programming language with SQL’s specialized data management and manipulation capabilities.

Understanding the Embedded SQL

Embedded SQL is not supported by all relational database management systems (RDBMS). Oracle DB and PostgreSQL provide embedded SQL support. MySQL, Sybase and SQL Server 2008 do not, although support was provided by earlier versions of SQL Server (2000 and 2005).The C programming language is commonly used for embedded SQL implementation. For example, a commercial bank’s information system (IS) has a front-end user interface created in the C language, and the IS interfaces with a back-end Oracle DB database. One of the front-end interface modules allows quick viewing and commission calculation for sales agents during specified periods. An inefficient approach to handling this process would be to store each commission value in a database table. However, a more effective solution is to calculate and return commission values based on unique user requests on specified dates. The application accomplishes this by embedding a SQL query within the C code, as follows:SELECT 0.2*SALE_AMOUNT FROM TOTAL_SALES WHERE SALE_DATE=’MM/DD’YYYY’ AND AGENT_NO=xxIn this example, the SQL statement calculates and returns 20 percent of the sale amount from a TOTAL_SALES table, while the user is expected to input the SALE_DATE and AGENT_NO values. This SQL query is then inserted inline into the C code of the front-end module. The C code and SQL query work together to deliver seamless user results.

Thuật ngữ liên quan

  • Structured Query Language (SQL)
  • Relational Database Management System (RDBMS)
  • SQL Server
  • C Programming Language (C)
  • Front-End System
  • Oracle Database (Oracle DB)
  • Information System (IS)
  • Commit
  • Access Modifiers
  • Acyclic

Source: ? Technology Dictionary – Filegi – Techtopedia – Techterm