Module SQL: Difference between revisions

Content deleted Content added
Declining submission: nn - Submission is about a topic not yet shown to meet general notability guidelines (be more specific if possible) (AFCH 0.9.1)
Risee01 (talk | contribs)
Link suggestions feature: 1 link added.
 
(19 intermediate revisions by 6 users not shown)
Line 1:
{{AFC submission|d|nn|u=Helena|ns=118|decliner=Stuartyeates|declinets=20230510192146|ts=20230330114355}} <!-- Do not remove this line! -->
 
{{AFC comment|1=In-depth coverage in independent secondary sources are required. [[User:Stuartyeates|Stuartyeates]] ([[User talk:Stuartyeates|talk]]) 19:21, 10 May 2023 (UTC)}}
 
----
 
{{Short description|Computer programming method}}
{{Draft topics|software|computing|technology}}
{{AfC topic|stem}}
 
'''Module SQL''' is a method of combining the [[computing]] power of a [[programming language]] and the [[database]] [[Data Manipulation Language|manipulation]] capabilities of [[SQL]]. Module SQL [[statement (programming)|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 [[compiler|compiled]] into calls to a SQL [[runtime library]] that interacts with the [[DBMS|Database management system]]. This allows programmers to call SQL statements from programsapplications written in anyregular number ofprogramming languages such as [[:Category:C programming language family|C/C++]], [[Ada (programming language)|Ada]], [[COBOL]] and [[Fortran]]. Module SQL is closely related to [[Embedded SQL]].
 
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.<ref name="modulelang">
Line 17 ⟶ 9:
|work=SQL*Module for Ada Programmer's Guide, Release 8.0, Chapter 1. Introduction to SQL*Module
|publisher=[[Oracle Corporation]]
|accessdate=2023-03-30}}</ref>
</ref> The SQL standard 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''. A popular host language is C.
 
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."<ref>{{cite book |last1=Oppel |first1=Andrew |title=SQL: A Beginner's Guide, Fourth Edition, 4th Edition |date=November 2015 |publisher=McGraw-Hill |isbn=978-0071842594 |pages=544 |edition=4th |url=https://learning.oreilly.com/library/view/sql-a-beginners/9780071842570/ch18.html#:-:text=Create%20SQL%20Client%20Modules}}</ref>
The SQL standard 2016 is available through purchase and contains chapter '''13 SQL-client modules''' and its syntax rules.<ref>{{cite web
 
|url=https://www.iso.org/standard/63556.html
|title== SQL Standard 2016Compliance Chapter 13 SQL-client modules==
 
|work=ISO/IEC 9075-2:2016 Information technology — Database languages — SQL — Part 2: Foundation (SQL/Foundation)
The [[SQL:2023]] standard (ISO/IEC 9075-2:2023 Information technology — Database languages SQL — Part 2: Foundation (SQL/Foundation), chapter 13<ref>{{cite web
|url=https://www.iso.org/standard/6355676584.html
|title=SQL Standard 2023, Chapter 13 SQL-client modules
|work=ISO/IEC 9075-2:20162023 Information technology — Database languages — SQL — Part 2: Foundation (SQL/Foundation)
|publisher=[[ISO]]
|accessdate=2023-0306-3005
}}</ref> The SQL standard) 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''. A popularSpecified host languagelanguages is C.are:
}}</ref>
 
* [[Ada_(programming_language)|Ada]] - Feature B111, “Module language Ada”
== Database systems that support module SQL ==
* [[C_(programming_language)|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_(programming_language)|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.)
=== Microsoft SQL Server ===
SQL modules is a technique among others for accessing the DBMS.<ref>{{cite web
|url=https://learn.microsoft.com/en-us/sql/odbc/reference/sql-modules?view=sql-server-ver16
|title=SQL Modules
|publisher=[[Microsoft]]
|accessdate=2023-03-30
}}</ref>
 
== Database systems that support module SQL ==
=== Mimer SQL===
=== Microsoft[[Mimer SQL Server]] ===
[[Mimer SQL]] 11.0 and later for [[Linux]], [[macOS]], [[OpenVMS]] and [[Windows]] support module SQL for C/C++, and Mimer SQL for [[OpenVMS]] also supports module SQL for COBOL, Fortran and Pascal.<ref>{{cite web
|url=https://docs.mimer.com/MimerSqlManual/latest/Manuals/Module_SQL/Module_SQL.htm
|title=Module SQL|publisher=[[Mimer SQL]]
|work=Mimer SQL Programmer's Manual latest version, Module SQL}}</ref>
; 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.
 
=== [[Oracle Database]] ===
Oracle 8.0 supported SQL*Module for Ada but support has been removed in later versions.<ref>{{cite web
; Ada
|url=https://docs.oracle.com/cd/A87860_01/doc/appdev.817/a58231.pdf
: Starting with Oracle8, SQL*Module uses Ada but appears to have not been updated since.<ref>{{cite web
|title=SQL*Module™ for Ada - Programmer's Guide
|publisher=Oracle Corporation
|accessdate=2023-0306-3019
}}</ref> SQL*Module is a module language that supports the Ada83 language standard for Ada.<ref>{{cite web
|url=http://download.oracle.com/docs/cd/B10501_01/server.920/a96530/migcompa.htm#1010868
|title=Ada Support in Version 8
Line 60 ⟶ 52:
|publisher=Oracle Corporation
|accessdate=2023-03-30
}}</ref>
}}</ref> SQL*Module is a module language that supports the Ada83 language standard for Ada.
 
=== [[Oracle Rdb]] ===
Supported host languages are Ada, [[BASIC]], C, COBOL, Fortran, Pascal and PL/I.<ref>{{cite web
|url=https://download.oracle.com/otn_hosted_doc/rdb/pdf/gsp.pdf
|title=Oracle Rdb7™, Guide to SQL Programming
|publisher=Oracle Corporation
|accessdate=2023-06-05
}}</ref>
 
== References ==
Line 69:
* [https://developer.mimer.com/article/module-sql/ Module SQL, Mimer SQL Developer]
 
[[:Category:SQL]]
[[:Category:Declarative programming languages]]
[[:Category:Query languages]]
[[:Category:Data modeling languages]]
[[:Category:Database APIs]]
[[:Category:SQL data access]]