Overview
ISO/IEC 9075-13:2023 - commonly called SQL/JRT - is the international standard that defines how the Java programming language is integrated with the SQL database language. Specifically, it specifies the ability to invoke static Java methods as SQL‑invoked routines and to use Java classes as SQL structured user‑defined types (UDTs). The fifth edition (2023) updates deployment artifacts, conformance guidance and aligns editorial aspects with the 2023 family of ISO/IEC 9075 standards.
Key topics and technical requirements
The standard organizes requirements across conceptual, syntactic and operational areas. Major technical topics include:
- Java routines and types: rules for declaring and invoking Java static methods from SQL and for mapping Java classes to SQL structured types.
- Parameter mapping and SQL result sets: how SQL types and Java types map, and how result sets and arrays are handled.
- Data type conversion and UDT support: conversion mechanisms between SQL and Java objects (including references to SERIALIZABLE and SQLDATA conversion approaches).
- Lexical and language elements: grammar for method invocation, new-object specifications, predicates and declarations used in SQL/JRT.
- Schema definition and manipulation: DDL statements for defining Java-backed routines, user‑defined types and views.
- JAR deployment and descriptors: handling of Java archives (JARs), deployment descriptor files and SQLJ built-in procedures (e.g., SQLJ.INSTALL_JAR, SQLJ.REMOVE_JAR, SQLJ.REPLACE_JAR, SQLJ.ALTER_JAVA_PATH).
- Security and access control: privileges model, basic security considerations for invoking Java from SQL.
- Exception and status handling: treatment of unhandled Java exceptions and associated SQLSTATE codes.
- Information and definition schemas: views and base tables that expose metadata about Java routines, JAR usage and user‑defined types.
- Conformance, optional features and implementation notes: rules for claiming conformance, plus informative annexes listing implementation‑defined/‑dependent elements and deprecated features.