SQLJ: Difference between revisions

Content deleted Content added
inform about static SQL
m General fixes and Typo fixing, typos fixed: guarentee → guarantee using AWB
Line 1:
'''SQLJ''' is an [[International Organization for Standardization|ISO]] standard (ISO/IEC 9075-10) for embedding [[SQL]] statements in [[Java (programming language)|Java]] programs.
 
Whereas [[JDBC]] provides an [[Application programming interface|API]], SQLJ consists of a [[programming language | language]] extension. Thus programs containing SQLJ must be run through a [[preprocessor]] (the SQLJ translator) before they can be compiled.
 
Some advantages of SQLJ over JDBC include:
* SQLJ commands tend to be shorter than equivalent JDBC programs.
* SQL syntax can be checked at compile time.
* Preprocessor might generate static SQL which performs better than dynamic SQL because query plan is created on program compile time, stored in database and reused at runtime. Static SQL can guarenteeguarantee worst case reply time and access plan stability. IBM DB2 supports static SQL use in SQLJ programs.
 
Disadvantages include: