Hi Vahid,
That's a very interesting topic, of course!
May I ask who you are writing this for?
We at Data Geekery believe that we have come to know the Java/SQL integration market pretty well, specifically after all the conference talks and talking to thousands of JDBC / Hibernate / jOOQ users, and to other software vendors in our ecosystem.
- JDBC was derived from ODBC in JDK 1.1 in 1997. Both ODBC and JDBC were an awesome abstraction over the hundreds of available SQL dialects and interaction patterns at the time. It was state of the art at the time.
- About at the same time, the ANSI SQLJ standard surfaced this planet (1998) to bring what the C language called Pro*C to the Java ecosystem - preprocessed, embedded SQL in Java. SQLJ was dead from the beginning. In my opinion, this mostly happened because powerful IDEs like JBuilder, Eclipse, and others appeared around at the same time, and they were a poor fit for SQLJ (and vice versa). Besides, SQLJ could only generate a limited subset of standard SQL, and wasn't able to allow for composable, dynamic SQL, only static SQL. More about this here:
http://blog.jooq.org/2014/01/03/why-did-sqlj-die
- Then, the dark ages of J2EE started, with EJB 1.0 and 2.0, which made us developers slaves to the enterprise for around 20 years. SQL was hidden behind so-called EntityBeans, which were a major pain to develop and maintain. Most EntityBean implementations still used JDBC, though. Usually, no one disagrees with this assessment.
- Then, in 2001, Gavin King and his fellows thought we need immediate remedy from the EJB hell, and created Hibernate. Still the best ORM today.
- Around at the same time, iBATIS (today MyBatis) was created to provide a completely alternative approach to writing non-embedded SQL in Java. This product is still quite popular given the few features it actually has.
- Then, in 2004-2014, the dark ages of the object-relational impedance mismatch had started, with people simply not believing what Gavin King had always said: "You don't have to use Hibernate for *everything*". Yes. Hibernate (and JPA) is great at doing domain-model centric persistence. Hibernate (and JPA) is bad at querying and bulk updating in relational-model centric applications. More about this rationale here:
http://www.hibernate-alternative.com
- Then, in 2009 I have created jOOQ (now owned and commercially distributed by Data Geekery GmbH) because in all that time, no one had really tried to do what was lacking all the time for what we roughly estimate to cover around 20% of the Java market (total 10M developers). Actual *typesafe* embedded SQL in Java. The idea behind jOOQ is the fact that old languages like COBOL and PL/SQL (you may think of them whatever you want) nicely integrated the declarative SQL language into the procedural "host" languages. This is extremely powerful and expressive and we see a big market for this kind of thing in the Java ecosystem
- Hopefully, in the next 1-2 years, jOOQ will evolve into a less proprietary standard, which truly embeds SQL as an external language (not an internal DSL, as today) into Java. Perhaps through compiler plugins or other tricks?
Apart from the above frameworks listed, there are lots of minor ones, of course, with similar ideas to the ones listed above. Most importantly, some APIs that simplify JDBC are popular, like Spring JDBC (JdbcTemplate).
So, long story short, the Java folks have always struggled to accept that SQL is really worth being a first-class citizen. Because of this neglect, we had all this mess over all these years, which we at Data Geekery are now aiming at remedying, at least for those people for whom SQL really matters.
You may obviously get a slightly less biased opinion from someone else :-)
Cheers
Lukas