Ads 468x60px

Monday, July 25, 2011

Why the Java Database Connectivity (JDBC) Specification?




Why the Java Database Connectivity (JDBC) Specification?

 The Java specification, as well as the original release of the Java Developer's Kit (JDK), made no provisions for Java database access. To create access to a database, a programmer had to create an intermediary program between the database manager and the Java program that would access the data. To force a multitude of programmers all to write code that does essentially the same thing is truly a waste. Of course, each different programmer would do it his/her own way and suddenly you'd have a large mess on your hands. It is entirely inefficient not to have a standardized access format between Java code and database management systems.
Another reason that a standardized database interface proves necessary stems from security issues. By making a standard JDBC specification, database manufacturers can produce interfaces for their database, regardless of the internal storage format, so that the standardized interface could work with any Java program. This is a large bonus: Any Java program that implements database features can manipulate and access any database that has a JDBC-compliant interface. Also, the standardized classes and interfaces of the database interface classes can join the ranks of "trusted" classes that Web browsers can then safely use. Of course, home-brewed database interfaces would not be trusted or put into wide use and applets would not be able to use databases at all.
For these reasons, some kind of standardized database capability is necessary. In March 1996, Sun Microsystems, Inc. addressed this need with the draft release of the Java Database Connectivity specification, JDBC. As of this writing, the JDBC specification is still in a request-for-comments phase and is scheduled to be available soon in a full release. This chapter addresses the problem of database access in Java and demonstrates how to write code that conforms to and enhances the JDBC interface.
A hidden plus of the JDBC standard is that implementing database features in a Java program should make it easy to use that same implementation on another database. Of course, standardizing all of these functions comes at a price. It is less efficient to include the JDBC interface as another layer between your program and the database itself, but you should be accustomed to the tradeoff between standardization and simplicity and efficiency.
Currently, a number of database system developers have committed to developing JDBC-specification-compliant interfaces for their database systems. As of July 1996, database system producers ranging from Borland to tiny companies have stated their intent to develop JDBC interfaces immediately. As always, the latest information on Java database developments can be found at Java's home page:

0 comments:

Post a Comment