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.