The Return of SQL to Java

Home

News: The Return of SQL to Java

  1. The Return of SQL to Java (3 messages)

    Like all technologies that follow a hype cycle, ORMs have reached the "plateau of productivity". People have gotten over the vietnam of computer science, accepting the fact that ORMs are good at what they do best: Loading and persisting complex object-graphs from and into a relational database.

    But not everyone sees ORMs as what they are. Many people still have hopes towards a better integration of Java with relational databases. Some may even think that escaping to "NoSQL" would solve their integration problems. This was recently illustrated by this popular InfoQ article, which contains a survey about how people prefer accessing their relational data from Java. Interestingly, jOOQ, an increasingly popular newcomer on the scene, already competes very well with more established Hibernate alternatives, such as MyBatis or EclipseLink.

    jOOQ offers a very novel approach that appears to be similar to .NET's popular LINQ-to-SQL. However, unlike LINQ and various Java or Scala mimicks thereof, jOOQ focuses on implementing only SQL as an internal domain-specific language in Java. Many Java developers know SQL very well and are missing appropriate tooling to have their data access code properly interact with SQL. Using jOOQ's source code generator and expressive fluent API, embedded SQL can now finally be compiled by the Java compiler directly, even for very complex statements.

    With Data Geekery's recently announced dual-licensing strategy for jOOQ, things can only get better in the ecosystem of Java and SQL integration, where SQL as a powerful and very expressive language really matters.

    Threaded Messages (3)

  2. SQL never left Java[ Go to top ]

    yawn. Using this board as a cheap advertising platform for a commercial tool, eh?

    You were always able to integrate SQL with Java. You had the choice of either SQLJ (static SQL embedded in Java), you could use the JPA or Hibernate query language (very convenient because you write queries based on your domain objects) or use Hibernates built-in capability of mapping arbitrary SQL statements. All this for free.

  3. Is SQLJ actually used by anyone?[ Go to top ]

    Many people are still using jOOQ in its Open Source form. Apparently, the curators of this platform found this piece of information newsworthy enough. It is interesting how "free" software is often regarded as an ethics that would justify advertising, but commercial software is something entirely else.

    As for your suggestions, I'm not aware of many people actually using SQLJ. There doesn't seem to be a lot of traction in that corner. Maybe I'm wrong, and I would be more than happy to read success stories talking about SQLJ

    Of course, Hibernate is an excellent tool for querying domain objects. But again, many people start to feel that it is an inadequate tool for writing SQL. Obviously, this doesn't have to do anything with it being free, either. Before Hibernate, TopLink was considered an excellent piece of commercial Oracle software.

  4. Is SQLJ actually used by anyone?[ Go to top ]

    I guess SQLJ is not a very popular technology and I do not use it myself but I prefer to read raw SQL instead of fluent or any other API.  Compile time validation is a nice feature but we use jsqlparser to validate all of SQL queries, it is trivial because all of queries are in external files and we can validate ad-hoc reporting queries too. JPA is very popular and it supports SQL too but I prefer MyBatis and other similar tools designed for SQL without compromise.