Recent Posts

Sunday, 11 November 2018

Type-4 Driver


     Type-4 driver also known as Pure Java Driver OR Thin Driver.


     This Driver is developed to talk with the Database directly without taking Support of ODBC Driver OR Vendor Specific Native Libraries OR Middleware Server. This Driver uses Database specific Native Protocols to communicate with the Database. This Driver converts JDBC Calls directly into Database specific Calls.
     This Driver developed only in Java and hence it is also known as Pure Java Driver. Because of this, Type-4 Driver is Platform Independent Driver. This Driver won't require any Native Libraries at Client side and hence it is light weighted. Because of this it is treated as Thin Driver.

Advantages
1. It won't require any Native Libraries, ODBC Driver OR Middleware Server
2. It is Platform Independent Driver
3. It uses Database Vendor specific Native Protocol and hence Security is more.

Limitation
     The only Limitation of this Driver is, it is Database Dependent Driver because it is communicating with the Database directly.

Note
     It is highly recommended to use Type-4 Driver.

Java Application ➔ Type-1 Driver ➔ ODBC Driver ➔ DB
Java Application ➔ Type-2 Driver ➔ Vendor Specific Native Libraries ➔ DB
Java Application ➔ Type-3 Driver ➔ Middleware Server ➔ DB
Java Application ➔ Type-4 Driver ➔ DB

Which Driver should be used?
1. If we are using only one Type of Database in our Application then it is recommended to use Type-4 Driver.
2. If we are using multiple Databases in our Application then Type-3 Driver is recommended to use.
3. If Type-3 and Type-4 Drivers are not available then only we should go for Type-2 Driver.
4. If no other Driver is available then only we should go for Type-1 Driver.

Next Tutorial : Differences between Thin and Thick Driver

Previous Tutorial : Type-3 Driver

No comments:

Post a Comment