By: Ramlak in JDBC Tutorials on 2007-04-04
JDBC is composed of a number of interfaces and classes that are implemented by driver developers. There are four different types of JDBC drivers that have been implemented as listed in the table below.
The type of driver to use depends on what software is required by the client application, the application that will be using JDBC to communicate with the database.
Both type 1 and type 2 drivers require a binary file on the client machine. A client application, however, could use a type 3 or type 4 driver to communicate with a database using JDBC and would not require any client-side binaries.
|Type 1||Implements JDBC by mapping JDBC calls to other CLI calls. Communicates with a binary library written in another language, using some form of inter-process communication. Requires software, such as the JDBC-ODBC bridge driver, on the client machine|
|Type 2||Driver is composed partially of Java code and partially of native code using another CLI. Requires some client-side binary code. Native code runs in the Java VM.|
|Type 3||Pure Java driver; uses middleware to convert JDBC calls to vendor-specific calls.|
|Type 4||Pure Java driver; implements the native protocol. Does not require middleware or any client-side binary. Can be downloaded to a client if necessary.|
The type 4 JDBC driver is considered the best driver to use for two reasons. One reason is that since the driver has been written completely in Java, it is externally portable. Another reason is that the driver is not required to map JDBC calls to corresponding native CLI calls. This avoids the overhead of mapping logic required by the type 1 or type 2 driver, or the overhead of comminicating with middleware required by the type3 driver. Such improvements in efficiency should allow the driver to execute faster than the other types of JDBC drivers.
This policy contains information about your privacy. By posting, you are declaring that you understand this policy:
- Your name, rating, website address, town, country, state and comment will be publicly displayed if entered.
- Aside from the data entered into these form fields, other stored data about your comment will include:
- Your IP address (not displayed)
- The time/date of your submission (displayed)
- Your email address will not be shared. It is collected for only two reasons:
- Administrative purposes, should a need to contact you arise.
- To inform you of new comments, should you subscribe to receive notifications.
- A cookie may be set on your computer. This is used to remember your inputs. It will expire by itself.
This policy is subject to change at any time and without notice.
These terms and conditions contain rules about posting comments. By submitting a comment, you are declaring that you agree with these rules:
- Although the administrator will attempt to moderate comments, it is impossible for every comment to have been moderated at any given time.
- You acknowledge that all comments express the views and opinions of the original author and not those of the administrator.
- You agree not to post any material which is knowingly false, obscene, hateful, threatening, harassing or invasive of a person's privacy.
- The administrator has the right to edit, move or remove any comment for any reason and without notice.
Failure to comply with these rules may result in being banned from submitting further comments.
These terms and conditions are subject to change at any time and without notice.
Most Viewed Articles (in JDBC )
Latest Articles (in JDBC)
- Data Science
- React Native
- Cloud Computing
- Java Beans
- Mac OS X
- Office 365
- Tech Reviews