This page is part of the book SQL-99 Complete, Really, by Peter Gulutzan & Trudy Pelzer. The authors have graciously allowed us to reproduce the contents of the book here. Because the book is about the SQL-99 standard, the contents of this and other pages in the book may not directly apply to MariaDB. Use the navigation bar to navigate the book.

SQL DBMSs communicate with SQL applications through a common programming language interface that is invoked through one of the SQL Standard-defined binding styles, or interface options. There are three main approaches to writing complete programs with SQL:

  • With embedded SQL, you can put SQL statements directly into host programs. We described this binding style earlier.
  • With SQL/CLI, you can call a SQL DBMS's library from a host program. This binding style was the subject of the last several chapters.
  • With the Module language, you can dispense with host programs and write entire Modules in SQL. You'll still have to call these Modules from one of the standard host languages though. The Module language binding style is the subject of this chapter.

Because we believe that SQL/CLI will quickly become the SQL interface of choice, this chapter omits large amounts of detail, in favour of providing the necessary detail in our chapters on SQL/CLI.

Note: The SQL Standard actually describes three kinds of SQL Module, each of which has certain characteristics and contains various kinds of Module Objects (principally, routines). An SQL-client Module contains only externally-invoked procedures, an SQL-session Module contains only SQL statements prepared in that SQL-session and an SQL-server Module the SQL/PSM type is a Schema Object that contains only SQL-invoked routines.