Overview
ISO/IEC 9075-3:2023 - Information technology - Database languages SQL - Part 3: Call‑Level Interface (SQL/CLI) - specifies the call‑level programming interface that applications use to execute SQL statements from within host languages. The sixth edition (2023) defines the structures, procedures, handle model, diagnostics, descriptor areas, data type correspondences, and routine set that allow applications and middleware to prepare, bind, execute and fetch SQL independently of specific SQL statement text or DBMS internals.
Keywords: ISO/IEC 9075-3:2023, SQL/CLI, Call‑Level Interface, database API, SQL programming interface.
Key Topics and Technical Requirements
- Call‑level concepts and conventions: notations, return codes, diagnostics areas, and multi‑row fetch semantics.
- Handle and attribute model: environment, connection and statement handles; attributes for environment, connection and statement behavior.
- Descriptor areas and data types: item/parameter descriptor tables, SQL/CLI datatype correspondences for host languages (Ada, C, COBOL, Fortran, M, Pascal, PL/I).
- Core CLI routines: allocation and management routines (AllocEnv, AllocConnect, AllocHandle, FreeEnv, FreeConnect, FreeHandle), connection and transaction control (Connect, Disconnect, StartTran, EndTran), statement lifecycle (Prepare, Execute, ExecDirect, BindParameter, BindCol, Execute, Fetch, CloseCursor).
- Diagnostics and status codes: SQLSTATE handling, diagnostic record formats and retrieval routines (GetDiagRec, GetDiagField).
- Cursors and result set handling: cursor descriptions, implicit and explicit prepared cursors, fetching rowsets, scroll and multi‑row fetch.
- Dynamic SQL and descriptors: preparing and executing SQL constructed at runtime, DESCRIBE/USING semantics, parameter modes and deferred checks.
- Client-server operation and implementation considerations, plus conformance rules and informative annexes (example header files and C programs).
Practical Applications and Users
ISO/IEC 9075-3:2023 is essential for:
- Database driver and middleware developers implementing SQL client libraries and ODBC/JDBC-like layers.
- DBMS vendors providing standardized programmatic access to SQL functionality.
- Application developers embedding SQL in host languages who need portable, language‑binding‑neutral APIs for prepared statements, parameter binding, and result processing.
- Tooling and ORM authors who implement low‑level data access layers compatible with international SQL standards.
Benefits include portability of database client code, consistent error/diagnostic handling, and standardized host language mappings.
Related Standards
- Part of the ISO/IEC 9075 (SQL) family - SQL/CLI complements other SQL parts by specifying the programmatic call interface.
- Conformance and feature taxonomy are defined within the standard (conformance rules, optional features, deprecated items).
For implementers and integrators, ISO/IEC 9075-3:2023 is the authoritative reference for building robust, portable SQL client interfaces and language bindings.