Sunday, February 06, 2005

Java and SQL

There is a lot of commotion in the J2EE world around the persistence layer these days. DB vendors hate the entity beans and there aren't many fans of the technology in the rest of J2EE user arena either. There are serious attempts underway to solve the problem in JCP through incorporating some variant of JDO which interoperate with the Open Source Hibernate framework.

I had a discussion with a friend who is passionate about PL/SQL and believes that Java has no place in the database arena. Not being much of a database person, I was left puzzled by this. I come from a language design background, and having written compilers and translators all my life, I don't think the work done in one language can't be done in another if one is willing to update a language. This is a different context than one which would lead to an argument that one language makes it much easier to do something than another (anything you can do in C++, you can do in C, but C++ enables you to do object oriented programming better).

In my mind, if there is a SQL engine inside a database, it should be feasible to do a Java based engine running on the JVM (or with native methods for that matter) and thus allow Java programmers to do database programming in their favorite language. This is even more significant given the new crop of Java only databases coming into the public arena, including some in open source.

So I have decided to spend some time figuring this out. If the gentle readers already have some idea on this subject or if there is a plethora of information available, please send it my way!

The first thing I am looking at is the java.sql package.