Overview
ISO/IEC 9075-10:2023 - Information technology - Database languages SQL - Part 10: Object language bindings (SQL/OLB) specifies how SQL is embedded in the Java programming language (commonly known as SQLJ or SQL/OLB). The standard defines the syntax and semantics for embedding SQL statements inside Java source, mechanisms for ensuring binary portability of SQLJ applications, and a set of Java packages and classes (including runtime interfaces) that support SQLJ execution and interoperability.
Key topics and technical requirements
- SQLJ embedding syntax and semantics: defines how SQL constructs, SQLJ clauses, host variables and host expressions are written and checked in Java source.
- Binary portability: requirements and components that enable SQLJ applications compiled on one platform to run on another without source-level recompilation (profiles, generated classes, and resource files).
- Profiles and translator-generated artifacts: specification of profile generation, naming, and translator-generated classes used to decouple SQL semantics from platform-specific details.
- Runtime packages and interfaces: standardized Java packages (for example, sqlj.runtime) and runtime interfaces such as ConnectionContext, iterator interfaces, and ResultSetIterator functionality (methods like next(), close(), setFetchSize(), etc.) to manage execution and resources.
- JDBC/SQLJ interoperability: rules and APIs for converting between SQLJ iterators and java.sql.ResultSet objects, and for creating SQLJ connection contexts from java.sql.Connection objects.
- Execution control and resource management: semantics for multi-threading considerations, multiple result sets, batch updates, transaction management (commit, rollback, savepoints), and exception/warning handling.
- Advanced features: support for dynamic SQL, user-defined datatypes, positioned and named iterators, and profile customization interfaces.
Practical applications and target users
- Java application developers embedding SQL directly in source code who need a standardized, type-safe way to access relational databases.
- Database vendors and tool providers implementing SQLJ translators, runtimes, and profile generators to ensure SQLJ binary portability and JDBC interoperability.
- Middleware and framework developers integrating SQLJ-enabled modules into Java EE / Jakarta EE and other Java-based systems.
- System architects and DBAs evaluating portability, maintainability, and runtime behavior of embedded-SQL solutions in Java environments.
Related standards
- ISO/IEC 9075-2 (embedded SQL for other host languages) - complementary rules and explanatory facilities.
- ISO/IEC TR 19075-3 - additional explanatory material related to embedded SQL facilities.
Keywords: ISO/IEC 9075-10:2023, SQL/OLB, SQLJ, embedded SQL Java, binary portability, sqlj.runtime, JDBC interoperability.