CRITICAL SKILL 7.7

Use SQLJ

SQLJ allows programmers to embed SQL statements directly into Java programs. Experienced Oracle programmers have worked with other embedded SQL environments like Pro*C, Pro*Fortran, and Pro*Cobol. Embedded SQL in Java is named SQLJ, not Pro*Java, because SQLJ is an industry standard and not an Oracle-specific product.

SQLJ Translator

Embedding SQL statements directly into a programming language reduces maintenance and makes it much easier to write Java database programs. A SQLJ translator (precompiler) is used to convert a .sqlj file containing embedded SQL statements into a .java file containing JDBC statements. The translated .java file is then compiled. SQLJ statements can contain queries, DML, transaction control, ...

Get Oracle Database 10g: A Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.