Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why did SQLJ die?

Tags:

orm

sqlj

Does anyone know why that was canned a long time ago? Seemed like it wasn't such a bad idea. My very naive guess is that ORM tools didn't need SQLJ and also plugged the gap. Anyway, still curious.

like image 818
Alexander Mills Avatar asked Sep 16 '13 13:09

Alexander Mills


People also ask

What is oracle SQLJ?

Overview of SQLJ A SQLJ program is a Java program containing embedded SQL statements that comply with the International Organization for Standardization (ISO) standard SQLJ Language Reference syntax. The Oracle SQLJ implementation supports the ISO SQLJ standard.

What is SQLJ how it is different from JDBC?

SQLJ programs allow direct embedding of Java bind expressions within SQL statements. JDBC requires separate get and/or set call statements for each bind variable and specifies the binding by position number. SQLJ provides strong typing of query outputs and return parameters and allows type-checking on calls.

What is SQLJ What are the requirements of SQLJ?

SQLJ uses database connections to type-check static SQL code. JDBC does not perform type-checking until run time. With SQLJ, you can embed Java variables in SQL statements. In contrast, JDBC requires separate get and set calls for each variable, and you must specify the binding by position number.


1 Answers

This isn't an authoritative answer, but I can see these reasons:

  • In the early 2000's, powerful IDEs (Eclipse, Netbeans, JBuilder) made their way into the Java ecosystem. SQLJ doesn't work well with IDEs
  • In the mid 2000's, everyone thought SQL itself was dead as ORMs started to hide SQL away
  • Today, there are more typesafe alternatives like jOOQ (or LINQ in .NET. Disclaimer: I work for the company behind jOOQ).

Besides, there are two major flaws to SQLJ:

  • SQLJ simplified embedding SQL, but never brought any additional compile-time safety, such as type checks and syntax checks.
  • SQLJ is good for static SQL, but dynamic SQL (with dynamic predicate or table source composition) cannot be achieved easily.
like image 159
Lukas Eder Avatar answered Nov 17 '22 03:11

Lukas Eder