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
Interesting developments in JDBC 4.0 are:
- No need to explicitly load JDBC drivers using Class.forName() to register a JDBC driver. The DriverManager class takes care of this automatically.
- Java SE Service Provider mechanism as another means to specify database drivers
- Specify SQL queries using Annotations
- Bundled database based on Apache Derby
- SQL 2003 support, including support for XML as a native database data type
- Improved exception handling with new exception classes
- 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.
>> 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