Understanding JDBC Driver Types

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
a JDBC driver is a sect of Java classes that implement the JDBC interfaces targeting a specific database the JDBC interfaces comes with standard Java but the implementation of these interfaces is specific to the database you need to connect to such an implementation is called JDBC driver there are four different types of JDBC drivers type 1 JDBC ODBC bridge driver type 2 native API driver type 3 Network protocol driver or middleware driver type 4 database protocol driver or pure Java driver these days type 4 drivers are widely used nevertheless we shall understand all the four types of JDBC drivers how they were they pros and cons also now let us understand the type 1 JDBC ODBC bridge driver whenever a java application uses type 1 JDBC driver that is JDBC ODBC bridge driver then it uses a ODBC driver to connect the database JDBC ODBC bridge driver converts JDBC method calls into the ODBC calls and redirect the request to ODBC driver ODBC driver converts the ODBC calls into NATO DBMS specific calls using the vendor database library and redirect the request to the database for processing let us understand the advantage of type 1 driver it is very easy to use almost any database for which an ODBC driver is installed can be access and data can be retrieved using type 1 driver when we try to understand the limitations performance will not be efficient since a JDBC called coasts through the bridge to the ODBC driver and then to the database and this applies even in the reverse process the ODBC driver needs to be installed on the client mission since this driver is not fully written in Java type front drivers are not portable not suitable for applets because the ODBC drivers needs to be installed on the claim now let us understand type 2 driver that is native a PA driver whenever a java application uses type 2 driver that is native API driver for JDBC for interacting with the database then the native API driver converts the JDBC method calls into native API calls of the database using the client-side libraries of the database for example Oracle OC a driver is a type 2 driver when we observe the advantage of type 2 drivers then as there is no implementation of JDBC ODBC bridge it is considerably faster than type 1 driver and when coming to its disadvantages not all the databases have a client-side library it is mandatory that the vendor client library needs to be installed on the client machine and type 2 driver is a platform dependent driver this driver supports all java application accepts applets and type 2 drivers are not thread safe now let us understand type 3 driver that is network protocol driver or simply it is also called as middleware driver whenever a java application uses the type 3 driver then the java method calls will be sent to the network protocol driver which converts the JDBC calls into a database server independent and middleware specific calls and that will be passed to the middleware middleware which acts like an application server converts the middleware server specific calls into database specific calls middleware might use a type 1 2 or 4 drivers to communicate with the database now let us understand the advantages in using type 3 driver since the communication between client and the middleware server is database independent there is no need for the database vendor library on the claim the claim needs not to be changed for any new database that is going to be added the middle V server which can be a full-fledged j2ee application server can provide typical middleware services like caching of connection query results load balancing logging and auditing etc a single driver can handle any database provided the middleware supports and when it comes to the disadvantages of type 3 driver applications will be slow due to increase in number of Network calls type 3 driver requires database specific coding to be done in the middleware maintenance of network protocol driver becomes costly because it requires a database specific coding to be done in the middle tire now let us understand the type 4 driver which is also called as all Java or native protocol driver or pure Java thin driver whenever an application uses type 4 driver then the JDBC method calls will be passed to the native protocol driver which converts the JDBC calls directly into a vendor specific database protocols as the database protocol is vendor specific the JDBC client requires separate drivers usually vendor supplied to connect to different types of databases for example Oracle teen driver so when we observed the advantage of type 4 driver type 4 drivers are completely implemented in Java to achieve platform independence these drivers does not translate the request into an intermediate format such as ODBC the claim application connects directly to the database server no transaction of middleware layers or use and hence performance will be very fast the JVM can manage all aspects of the application to database connections and when it comes to the disadvantages of type 4 drivers drivers our database dependent as different database vendors use widely different network protocols now let us understand the usage of these drivers if you are accessing one type of database such as Oracle sequel server my sequel etc then the prefer driver type is for if your java application is accessing multiple types of databases at the same time type 3 is the preferred driver type 2 drivers are useful in situations where type 3 or type 4 drivers are not available yet for your database the type 1 driver is not considered a deployment level driver and it is typically used for development and testing purposes only you
Info
Channel: sekhar srinivas
Views: 62,590
Rating: 4.5860286 out of 5
Keywords: JDBC Driver Types, Understanding JDBC Driver Types, JDBC ODBC Bridge Driver, JDBC Native API Driver, Network Protocol Driver, Middleware Driver, Database Protocol Driver, Pure Java Driver, أنواع سائق JDBC, Tipos de controladores JDBC, La comprensión de JDBC Driver Types, JDBC ड्राइवर प्रकार, Types de pilote JDBC, Présentation des types de pilote JDBC, JDBC-Treiber-Typen, Das Verständnis JDBC-Treiber-Typen, Tipos driver JDBC, Noções básicas sobre tipos de driver JDBC
Id: B1ClVEgt8Ys
Channel Id: undefined
Length: 8min 39sec (519 seconds)
Published: Fri Mar 04 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.