Type 3 Driver
A JDBC Driver that converts JDBC API calls into DATABASE independent network calls is referred as Type-3 Driver.
· Type-4 DRIVER is purely developed in java language as part of this driver the java networking code is provided to communicate with database server.
Type 3 Driver Advantages:
· Most of times type-3 driver is used as part of the applications which cares about the security.
· This type of JDBC Driver is implemented in 3 tier architecture
Ex: Fig: Type3Driver a
· The database server details such as location and authentication details are not exposed to the client (java application)
· This has an opportunity of managing the db recourses such as connection effectively by reusing them between the clients improving the scalability and reducing the cost.
· Note: this can reduce the cost in case if the application is multiuser and multi-threaded or multiple applications accessing the same database.
· Type 3 Is database independent
· Type 3 is pure java driver thus lightweight and portable
· Supports conveniently working with distributed transaction.
Type 3 Driver Disadvantages:
· Having a middleware server and multiple network calls finds costlier in some times (i.e for the application.
· That are not seriously interested with the above listed advantages.
· If u want to use type-3 driver we have to buy the application servers.
When to use this type of Driver(Type 3 Driver)?
Ans: this is the first choice of any java enterprise application. However in case if the applications is really small and does not matter the advantage of this driver then only it looks for Type-2/4.
(port means receiving the request, sends response, it is just like a door)
Note:
If you want to communicate with database server we have only two ways to communicate 1. API calls or 2. Network calls:
Fig: InterfaceDriver.JPG
Note: Interface: there are 3 types of interfaces:
(1.) UI (User Interface)
(2.) API
(3.) Network Interface
Here API Interface and Network Interface are divided into 2 types:
1. Independent
2. Dependent.
1.
Type
|
Type-1
|
Type -2
|
Type -3
|
Type -4
|
Converts to
|
DB Independent API CALLS
|
DB Native API calls
|
DB Independent network call
|
DB Native Network call
|
DB Independent
|
Yes
|
No
|
Yes
|
No
|
Pure java
|
No
|
No
|
Yes
|
Yes
|
Advantages
|
·
DB independent
·
Early access
·
Allow accessing DB server that does not
directly support java/jdbc
|
·
Speed of operation
|
·
Better resource management
·
Secure
·
Improves scalability
·
DB Independent
·
Convenient to work with distributed
transaction
|
·
Light weight
·
portable
|
No comments:
Post a Comment