Jump to content

Module SQL

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Fjerdingen (talk | contribs) at 14:31, 7 June 2023 (Submitting using AfC-submit-wizard). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
  • Comment: In-depth coverage in independent secondary sources are required. Stuartyeates (talk) 19:21, 10 May 2023 (UTC)


Module SQL is a method of combining the computing power of a programming language and the database manipulation capabilities of SQL. Module SQL statements are SQL statements written in an SQL client module, that can be called as routines from the host language program source code like a host language routine. An SQL standard Module Language file is compiled into calls to a SQL runtime library that interacts with the Database management system. This allows programmers to call SQL statements from applications written in regular programming languages.

Using Module Language is very straightforward: place all SQL code in a separate module, and define an interface between the module containing the SQL code and the host program.[1]

Module SQL is closely related to Embedded SQL. "SQL client modules are self-contained collections of SQL statements. Unlike embedded SQL, in which the SQL statements are inserted into the host programming language, SQL client modules are separate from the host language. The host language contains calls that invoke the module, which in turn executes the SQL statements within that module."[2]

SQL Standard Compliance

The SQL:2023 standard (ISO/IEC 9075-2:2023 Information technology — Database languages SQL — Part 2: Foundation (SQL/Foundation), chapter 13[3]) defines an SQL module as an SQL client module, and the language in which SQL queries are called is referred to as the host language. Specified host languages are:

  • Ada - Feature B111, “Module language Ada”
  • C - Feature B112, “Module language C”
  • COBOL - Feature B113, “Module language COBOL”
  • Fortran - Feature B114, “Module language Fortran”
  • MUMPS - Feature B115, “Module language MUMPS”
  • Pascal - Feature B116, “Module language Pascal”
  • PL/I - Feature B117, “Module language PL/I”

(All the languages listed above are optional features, which means that each vendor can decide which language(s) to support.)

Database systems that support module SQL

SQL modules is a technique among others for accessing the DBMS.[4]

Mimer SQL for Linux, macOS, OpenVMS and Windows support module SQL.[5]

C/C++
Module SQL for C/C++ is supported on Linux, macOS, OpenVMS and Windows.
COBOL
Module SQL for COBOL is supported on OpenVMS.
Fortran
Module SQL for Fortran is supported on OpenVMS.
Pascal
Module SQL for Pascal is supported on OpenVMS.
Ada
Starting with Oracle8, SQL*Module uses Ada but appears to have not been updated since.[6] SQL*Module is a module language that supports the Ada83 language standard for Ada.

Supported host languages are Ada, BASIC, C, COBOL, Fortran, Pascal and PL/I.[7]

References

  1. ^ "The Module Language Concept". SQL*Module for Ada Programmer's Guide, Release 8.0, Chapter 1. Introduction to SQL*Module. Oracle Corporation. Retrieved 2023-03-30.
  2. ^ Oppel, Andrew (November 2015). SQL: A Beginner's Guide, Fourth Edition, 4th Edition (4th ed.). McGraw-Hill. p. 544. ISBN 978-0071842594.
  3. ^ "SQL Standard 2023, Chapter 13 SQL-client modules". ISO/IEC 9075-2:2023 Information technology — Database languages — SQL — Part 2: Foundation (SQL/Foundation). ISO. Retrieved 2023-06-05.
  4. ^ "SQL Modules". Microsoft. Retrieved 2023-03-30.
  5. ^ "Module SQL". Mimer SQL Programmer's Manual latest version, Module SQL. Mimer SQL.
  6. ^ "Ada Support in Version 8". Oracle9i Database Migration, Release 2 (9.2), Chapter 5. Compatibility and Interoperability. Oracle Corporation. Retrieved 2023-03-30.
  7. ^ "Oracle Rdb7™, Guide to SQL Programming" (PDF). Oracle Corporation. Retrieved 2023-06-05.

Category:SQL Category:Declarative programming languages Category:Query languages Category:Data modeling languages Category:Database APIs Category:SQL data access