Embedded Structured Query language in Java (SQLJ) support

Structured Query Language in Java (SQLJ) is a set of programming extensions that enable a programmer, using the Java programming language, to embed statements that provide SQL (Structured Query Language) database requests.

Advantages of developing applications with SQLJ include improved performance and a shorter, more efficient development cycle:

  • You improve performance by using static SQL statements.

  • You reduce the development cycle because:

    • You write less code with the simpler SQLJ syntax, which reduces the number of lines of code required to execute statements, and to set and retrieve parameters.

    • You detect programming errors earlier in the development phase with the onlinecheck function, which performs data type and schema validation. Activate this function by running it as an option with the db2sqljcustomize command. See the DB2 documentation for a complete description of the SQLJ customize command.

You might consider using SQLJ in situations where dynamic SQL is not needed, and where applications use DB2 as the backend database.


 

Related Tasks


Using embedded Structured Query Language in Java (SQLJ) support
Using Structured Query Language in Java (SQLJ) for Enterprise Java Bean (EJB) Container Managed Persistence (CMP) beans
Using Structured Query Language in Java for bean-managed persistence entity beans, session beans, and servlets