With improved JDBC 4.0, do we still need fancy persistence and relational mapping technologies?

Java SE 6.0 is expected to be released in October 06. An important part of the new version of Java is the new JDBC 4.0 API. JDBC 4.0 brings several changes to JDBC, but its top priority is making things easier for developers.

Looking at the new features, one wonders if its time to go back to plain old JDBC?


Too much boilerplate code and disconnect from object oriented
development were amongst the top reasons why developers moved from JDBC
to ORM technologies like Hibernate. With version 4.0, JDBC is making a
comeback.

Interesting developments in JDBC 4.0 are:

  1. No need to explicitly load JDBC drivers using Class.forName() to register a JDBC driver. The DriverManager class takes care of this automatically.
  2. Java SE Service Provider mechanism as another means to specify database drivers
  3. Specify SQL queries using Annotations
  4. Bundled database based on Apache Derby
  5. SQL 2003 support, including support for XML as a native database data type
  6. Improved exception handling with new exception classes
  7. A new DataSet interface. When used in a connected mode, the DataSet functions in a manner similar to ResultSet. A disconnected DataSet functions in a manner similar to a CachedRowSet. You can navigate, modify and delete records in a DataSet.

These new features and the fact that almost all Java developers know JDBC, JDBC does again look like a promising alternative.

Also irrespective of developments in persistence technologies and the emergence of several new APIs like JPA, EJB 3.0, standards and tools, many Java developers still feel that JDBC is the simplest and fastest way to work with databases. So there’s a readymade following for JDBC that won’t hesitate to go back to it.

Also considering recent trends to reduce complexity in Java development, JDBC should fit in well.

Frank Sommers in his article “Upcoming Features in JDBC 4” says “introducing O/R mapping into an application just to make it easier to work with relational databases incurs additional complexity that could be avoided by an improved JDBC API. ” . Srini Penchikala in his article JDBC 4.0 Enhancements in Java SE 6 says “The main objectives of the new JDBC features are to provide a simpler design and better developer experience.

So have we come full circle? Is it time to go back to good old JDBC? Do share your comments below.

Related
>> How to decide which persistence technology to use? JDBC / CMP Entity Beans / Hibernate / JDO?
>> Quick Hibernate – Tutorial
>> New MS JDBC Driver for SQL Server 2005 – JAVA J2EE PORTAL
>> Oracle releases free database
>> GOF Factory – Have your own too
>> Hibernate 3.0 is the world’s most sophisticated (ORXM) solution …
>> Checking EJB 3.0 performance

Content Team

The IndicThreads Content Team posts news about the latest and greatest in software development as well as content from IndicThreads' conferences and events. Track us social media @IndicThreads. Stay tuned!

0 thoughts on “With improved JDBC 4.0, do we still need fancy persistence and relational mapping technologies?

  • August 7, 2006 at 10:32 am
    Permalink

    Why not use Object relational mapping tools if it is obviously simpler than using any version of JDBC ?

  • August 7, 2006 at 4:13 am
    Permalink

    The new kids driven by hype around ORM products like Hibernate tried them. The old Java developers were always using JDBC.

    JDBC 4.0 is good news. Although a simplification of the exception handling mechanism would have been great.

  • July 22, 2006 at 2:30 am
    Permalink

    If you are in a software factory full of developers, contributing is a way to stand out and be the coolest one.

Leave a Reply