SlideShare a Scribd company logo
By: Rahul Sharma
JDBC stands for Java Database Connectivity. It
is a software component, which enable us to
interact with database. It works as an interface
between the client and a database server. It
contains various classes and their methods.
JDBC drivers enable us to create database
connections and to interact with it by sending
SQL or database commands.
1. Type 1: JDBC-ODBC bridge driver
2. Type 2: Native-API driver/Partly driver
3. Type 3: Network-Protocol driver (Middleware driver)
4. Type 4: Database-Protocol driver (Pure Java driver) or thin
driver.
This driver converts JDBC method
calls into ODBC function calls. This
driver is platform-dependent as it
makes use of ODBC which depends
on native libraries of the
underlying OS. Also, use of this
driver leads to other installation
dependencies.
For example, ODBC must
be installed on the computer having
the driver and the database must
support an ODBC driver.
1. Almost any database for which an ODBC driver is installed can
be accessed, and data can be retrieved.
1. Performance overhead since the calls have to go through the
JDBC bridge to the ODBC driver, then to the native db
connectivity interface (thus may be slower than other types of
drivers).
2. The ODBC driver needs to be installed on the client machine.
3. Not suitable for applets, because the ODBC driver needs to be
installed on the client.
4. This driver internally depending on ODBC driver and ODBC
driver is available only for windows platforms and hence
portability of this driver is much less (platform dependent driver).
5. No support from JDK 1.8v onwards
In Type 2 driver, JDBC API calls
are converted into native C/C++
API calls, which are unique to the
database. These drivers are
provided by the database vendors
and used in the same manner as
the JDBC-ODBC Bridge. The
vendor-specific driver must be
installed on each client machine.
If we change the
Database, we have to change the
native API, as it is specific to a
database, but you may realize
increase in speed with a Type 2
driver, because it eliminates
ODBC's overhead.
1. As there is no implementation of JDBC-ODBC bridge, its
considerably faster than a type 1 driver.
1. The vendor client library needs to be installed on the client
machine.
2. Not all databases have a client side library.
3. This driver is platform dependent.
4. This driver supports all java applications except applets.
The type 3 driver, also known as the
Pure Java driver for database-
middleware, is a database driver
implementation which makes use of
a middle tier between the calling
program and the database. The
middle-tier converts JDBC calls
directly or indirectly into the vendor-
specific database protocol.
The same driver can be used
for multiple databases. The type 3
driver is platform-independent as the
platform-related differences are
taken care of by the middleware.
Also, making use of the middleware
provides additional advantages of
security and firewall access.
1. Requires database-specific coding to be done in the middle tier.
2. The middleware layer added may result in additional latency, but
is typically overcome by using better middleware services
1. Since the communication between client and the middleware
server is database independent, there is no need for the
database vendor library on the client.
2. The middleware server (which can be a full-fledged J2EE
Application server) can provide typical middleware services like
caching, load balancing, logging, and auditing.
3. A single driver can handle any database, provided the
middleware supports it.
The type 4 driver, also known as the
Direct to Database Pure Java
Driver, that converts JDBC calls
directly into a vendor-
specific database protocol.
This provides better
performance than the type 1 and
type 2 drivers as it does not have the
overhead of conversion of calls into
ODBC or database API calls. Unlike
the type 3 drivers, it does not need
associated software to work. As the
database protocol is vendor specific,
the JDBC client requires separate
drivers, usually vendor supplied, to
connect to different types of
1. Completely implemented in Java to achieve platform
independence.
2. The client application connects directly to the database server.
No translation or middleware layers are used, improving
performance.
3. The JVM can manage all aspects of the application-to-database
connection; this can facilitate debugging.
1. Drivers are database dependent, as different database vendors
use widely different (and usually proprietary) network protocols.
1. If you are accessing one type of database, such as Oracle,
Sybase, or IBM, the preferred driver type is 4.
2. If your Java application is accessing multiple types of databases
at the same time, type 3 is the preferred driver.
3. Type 2 drivers are useful in situations, where a type 3 or type 4
driver is not available yet for your database.
4. The type 1 driver is not considered a deployment-level driver,
and is typically used for development and testing purposes only.
Referenced by: Wikipedia.

More Related Content

What's hot

Java Server Pages(jsp)
Java Server Pages(jsp)Java Server Pages(jsp)
Java Server Pages(jsp)
Manisha Keim
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
Jafar Nesargi
 
Android Networking
Android NetworkingAndroid Networking
Android Networking
Maksym Davydov
 
Presentation on Core java
Presentation on Core javaPresentation on Core java
Presentation on Core java
mahir jain
 
JVM
JVMJVM
servlet in java
servlet in javaservlet in java
servlet in java
sowfi
 
Interface in java
Interface in javaInterface in java
Interface in java
PhD Research Scholar
 
Advance Java Topics (J2EE)
Advance Java Topics (J2EE)Advance Java Topics (J2EE)
Advance Java Topics (J2EE)
slire
 
Remote Method Invocation (Java RMI)
Remote Method Invocation (Java RMI)Remote Method Invocation (Java RMI)
Remote Method Invocation (Java RMI)
Sonali Parab
 
JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...
JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...
JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...
Pallepati Vasavi
 
Java-java virtual machine
Java-java virtual machineJava-java virtual machine
Java-java virtual machine
Surbhi Panhalkar
 
virtual function
virtual functionvirtual function
virtual function
VENNILAV6
 
e-commerce web development project report (Bookz report)
e-commerce web development project report (Bookz report)e-commerce web development project report (Bookz report)
e-commerce web development project report (Bookz report)
Mudasir Ahmad Bhat
 
Distributed objects & components of corba
Distributed objects & components of corbaDistributed objects & components of corba
Distributed objects & components of corba
Mayuresh Wadekar
 
JAVA ENVIRONMENT
JAVA  ENVIRONMENTJAVA  ENVIRONMENT
JAVA ENVIRONMENT
josemachoco
 
Socket programming
Socket programmingSocket programming
Socket programming
chandramouligunnemeda
 
Core java
Core javaCore java
Core java
sharad soni
 
Command line arguments.21
Command line arguments.21Command line arguments.21
Command line arguments.21
myrajendra
 
C# Framework class library
C# Framework class libraryC# Framework class library
C# Framework class library
Prem Kumar Badri
 
CORE JAVA SYLLABUS FROM SHPINE
CORE JAVA SYLLABUS FROM SHPINECORE JAVA SYLLABUS FROM SHPINE
CORE JAVA SYLLABUS FROM SHPINE
SHPINE TECHNOLOGIES
 

What's hot (20)

Java Server Pages(jsp)
Java Server Pages(jsp)Java Server Pages(jsp)
Java Server Pages(jsp)
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
 
Android Networking
Android NetworkingAndroid Networking
Android Networking
 
Presentation on Core java
Presentation on Core javaPresentation on Core java
Presentation on Core java
 
JVM
JVMJVM
JVM
 
servlet in java
servlet in javaservlet in java
servlet in java
 
Interface in java
Interface in javaInterface in java
Interface in java
 
Advance Java Topics (J2EE)
Advance Java Topics (J2EE)Advance Java Topics (J2EE)
Advance Java Topics (J2EE)
 
Remote Method Invocation (Java RMI)
Remote Method Invocation (Java RMI)Remote Method Invocation (Java RMI)
Remote Method Invocation (Java RMI)
 
JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...
JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...
JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...
 
Java-java virtual machine
Java-java virtual machineJava-java virtual machine
Java-java virtual machine
 
virtual function
virtual functionvirtual function
virtual function
 
e-commerce web development project report (Bookz report)
e-commerce web development project report (Bookz report)e-commerce web development project report (Bookz report)
e-commerce web development project report (Bookz report)
 
Distributed objects & components of corba
Distributed objects & components of corbaDistributed objects & components of corba
Distributed objects & components of corba
 
JAVA ENVIRONMENT
JAVA  ENVIRONMENTJAVA  ENVIRONMENT
JAVA ENVIRONMENT
 
Socket programming
Socket programmingSocket programming
Socket programming
 
Core java
Core javaCore java
Core java
 
Command line arguments.21
Command line arguments.21Command line arguments.21
Command line arguments.21
 
C# Framework class library
C# Framework class libraryC# Framework class library
C# Framework class library
 
CORE JAVA SYLLABUS FROM SHPINE
CORE JAVA SYLLABUS FROM SHPINECORE JAVA SYLLABUS FROM SHPINE
CORE JAVA SYLLABUS FROM SHPINE
 

Viewers also liked

jdbc
jdbcjdbc
Jdbc in java
Jdbc in javaJdbc in java
Jdbc in java
Asya Dudnik
 
Different type of_software_testing - copy
Different type of_software_testing - copyDifferent type of_software_testing - copy
Different type of_software_testing - copy
Yogita patil
 
Jdbc Ppt
Jdbc PptJdbc Ppt
Chapter v(error)
Chapter v(error)Chapter v(error)
Chapter v(error)
Chhom Karath
 
Module 1
Module 1Module 1
Exceptions in PHP
Exceptions in PHPExceptions in PHP
Exceptions in PHP
JanTvrdik
 
Evolution of java
Evolution of javaEvolution of java
Evolution of java
sanjeevonline
 
Jdbc
JdbcJdbc
Software Process Models
Software Process ModelsSoftware Process Models
Software Process Models
Hassan A-j
 
02 software process_models
02 software process_models02 software process_models
SDLC and Software Process Models
SDLC and Software Process ModelsSDLC and Software Process Models
SDLC and Software Process Models
Nana Sarpong
 
Java Programming- Introduction to Java Applet Programs
Java Programming- Introduction to Java Applet ProgramsJava Programming- Introduction to Java Applet Programs
Java Programming- Introduction to Java Applet Programs
Trinity Dwarka
 
Types of Software testing
Types of  Software testingTypes of  Software testing
Types of Software testing
Makan Singh
 
Jdbc
JdbcJdbc
Lecture03 p1
Lecture03 p1Lecture03 p1
Lecture03 p1
aa11bb11
 
Unit testing
Unit testingUnit testing
Unit testing
princezzlove
 
Java applets
Java appletsJava applets
Java applets
Khan Mac-arther
 
Programacion con java
Programacion con javaProgramacion con java
Programacion con java
Juan Carlos Jiménez Pacheco
 
Introduction to the Servlet / JSP course
Introduction to the Servlet / JSP course Introduction to the Servlet / JSP course
Introduction to the Servlet / JSP course
JavaEE Trainers
 

Viewers also liked (20)

jdbc
jdbcjdbc
jdbc
 
Jdbc in java
Jdbc in javaJdbc in java
Jdbc in java
 
Different type of_software_testing - copy
Different type of_software_testing - copyDifferent type of_software_testing - copy
Different type of_software_testing - copy
 
Jdbc Ppt
Jdbc PptJdbc Ppt
Jdbc Ppt
 
Chapter v(error)
Chapter v(error)Chapter v(error)
Chapter v(error)
 
Module 1
Module 1Module 1
Module 1
 
Exceptions in PHP
Exceptions in PHPExceptions in PHP
Exceptions in PHP
 
Evolution of java
Evolution of javaEvolution of java
Evolution of java
 
Jdbc
JdbcJdbc
Jdbc
 
Software Process Models
Software Process ModelsSoftware Process Models
Software Process Models
 
02 software process_models
02 software process_models02 software process_models
02 software process_models
 
SDLC and Software Process Models
SDLC and Software Process ModelsSDLC and Software Process Models
SDLC and Software Process Models
 
Java Programming- Introduction to Java Applet Programs
Java Programming- Introduction to Java Applet ProgramsJava Programming- Introduction to Java Applet Programs
Java Programming- Introduction to Java Applet Programs
 
Types of Software testing
Types of  Software testingTypes of  Software testing
Types of Software testing
 
Jdbc
JdbcJdbc
Jdbc
 
Lecture03 p1
Lecture03 p1Lecture03 p1
Lecture03 p1
 
Unit testing
Unit testingUnit testing
Unit testing
 
Java applets
Java appletsJava applets
Java applets
 
Programacion con java
Programacion con javaProgramacion con java
Programacion con java
 
Introduction to the Servlet / JSP course
Introduction to the Servlet / JSP course Introduction to the Servlet / JSP course
Introduction to the Servlet / JSP course
 

Similar to JDBC Driver Types

Jdbc driver types
Jdbc driver typesJdbc driver types
Jdbc driver types
Arvind Kumar
 
Jdbc driver types
Jdbc driver typesJdbc driver types
Jdbc driver types
Soham Kansodaria
 
Jdbc drivers
Jdbc driversJdbc drivers
Jdbc drivers
Sriramkumar Kandasamy
 
Chapter2 j2ee
Chapter2 j2eeChapter2 j2ee
Chapter2 j2ee
Jafar Nesargi
 
Jdbc 1
Jdbc 1Jdbc 1
JDBC java database connectivity with dbms
JDBC java database connectivity with dbmsJDBC java database connectivity with dbms
JDBC java database connectivity with dbms
KhyalNayak
 
Jdbc
JdbcJdbc
Jdbc
gee eew3
 
Jdbc architecture and driver types ppt
Jdbc architecture and driver types pptJdbc architecture and driver types ppt
Jdbc architecture and driver types ppt
kamal kotecha
 
Jdbc
JdbcJdbc
Jdbc
JdbcJdbc
JDBC Architecture and Drivers
JDBC Architecture and DriversJDBC Architecture and Drivers
JDBC Architecture and Drivers
SimoniShah6
 
jdbc document
jdbc documentjdbc document
jdbc document
Yamuna Devi
 
Unit 5-jdbc2
Unit 5-jdbc2Unit 5-jdbc2
Unit 5-jdbc2
msafad
 
Advanced JAVA
Advanced JAVAAdvanced JAVA
Advanced JAVA
Rajvi Vaghasiya
 
Jdbc drivers
Jdbc driversJdbc drivers
Jdbc drivers
Saurabh Bhartiya
 
Java unit 14
Java unit 14Java unit 14
Java unit 14
Shipra Swati
 
Jdbc
JdbcJdbc
java.pptx
java.pptxjava.pptx
java.pptx
bfgd1
 
Jdbc complete
Jdbc completeJdbc complete
Jdbc complete
Sandeep Rawat
 
Jdbcdriver
JdbcdriverJdbcdriver

Similar to JDBC Driver Types (20)

Jdbc driver types
Jdbc driver typesJdbc driver types
Jdbc driver types
 
Jdbc driver types
Jdbc driver typesJdbc driver types
Jdbc driver types
 
Jdbc drivers
Jdbc driversJdbc drivers
Jdbc drivers
 
Chapter2 j2ee
Chapter2 j2eeChapter2 j2ee
Chapter2 j2ee
 
Jdbc 1
Jdbc 1Jdbc 1
Jdbc 1
 
JDBC java database connectivity with dbms
JDBC java database connectivity with dbmsJDBC java database connectivity with dbms
JDBC java database connectivity with dbms
 
Jdbc
JdbcJdbc
Jdbc
 
Jdbc architecture and driver types ppt
Jdbc architecture and driver types pptJdbc architecture and driver types ppt
Jdbc architecture and driver types ppt
 
Jdbc
JdbcJdbc
Jdbc
 
Jdbc
JdbcJdbc
Jdbc
 
JDBC Architecture and Drivers
JDBC Architecture and DriversJDBC Architecture and Drivers
JDBC Architecture and Drivers
 
jdbc document
jdbc documentjdbc document
jdbc document
 
Unit 5-jdbc2
Unit 5-jdbc2Unit 5-jdbc2
Unit 5-jdbc2
 
Advanced JAVA
Advanced JAVAAdvanced JAVA
Advanced JAVA
 
Jdbc drivers
Jdbc driversJdbc drivers
Jdbc drivers
 
Java unit 14
Java unit 14Java unit 14
Java unit 14
 
Jdbc
JdbcJdbc
Jdbc
 
java.pptx
java.pptxjava.pptx
java.pptx
 
Jdbc complete
Jdbc completeJdbc complete
Jdbc complete
 
Jdbcdriver
JdbcdriverJdbcdriver
Jdbcdriver
 

Recently uploaded

The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 

Recently uploaded (20)

The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 

JDBC Driver Types

  • 2. JDBC stands for Java Database Connectivity. It is a software component, which enable us to interact with database. It works as an interface between the client and a database server. It contains various classes and their methods. JDBC drivers enable us to create database connections and to interact with it by sending SQL or database commands.
  • 3. 1. Type 1: JDBC-ODBC bridge driver 2. Type 2: Native-API driver/Partly driver 3. Type 3: Network-Protocol driver (Middleware driver) 4. Type 4: Database-Protocol driver (Pure Java driver) or thin driver.
  • 4. This driver converts JDBC method calls into ODBC function calls. This driver is platform-dependent as it makes use of ODBC which depends on native libraries of the underlying OS. Also, use of this driver leads to other installation dependencies. For example, ODBC must be installed on the computer having the driver and the database must support an ODBC driver.
  • 5. 1. Almost any database for which an ODBC driver is installed can be accessed, and data can be retrieved. 1. Performance overhead since the calls have to go through the JDBC bridge to the ODBC driver, then to the native db connectivity interface (thus may be slower than other types of drivers). 2. The ODBC driver needs to be installed on the client machine. 3. Not suitable for applets, because the ODBC driver needs to be installed on the client. 4. This driver internally depending on ODBC driver and ODBC driver is available only for windows platforms and hence portability of this driver is much less (platform dependent driver). 5. No support from JDK 1.8v onwards
  • 6. In Type 2 driver, JDBC API calls are converted into native C/C++ API calls, which are unique to the database. These drivers are provided by the database vendors and used in the same manner as the JDBC-ODBC Bridge. The vendor-specific driver must be installed on each client machine. If we change the Database, we have to change the native API, as it is specific to a database, but you may realize increase in speed with a Type 2 driver, because it eliminates ODBC's overhead.
  • 7. 1. As there is no implementation of JDBC-ODBC bridge, its considerably faster than a type 1 driver. 1. The vendor client library needs to be installed on the client machine. 2. Not all databases have a client side library. 3. This driver is platform dependent. 4. This driver supports all java applications except applets.
  • 8. The type 3 driver, also known as the Pure Java driver for database- middleware, is a database driver implementation which makes use of a middle tier between the calling program and the database. The middle-tier converts JDBC calls directly or indirectly into the vendor- specific database protocol. The same driver can be used for multiple databases. The type 3 driver is platform-independent as the platform-related differences are taken care of by the middleware. Also, making use of the middleware provides additional advantages of security and firewall access.
  • 9. 1. Requires database-specific coding to be done in the middle tier. 2. The middleware layer added may result in additional latency, but is typically overcome by using better middleware services 1. Since the communication between client and the middleware server is database independent, there is no need for the database vendor library on the client. 2. The middleware server (which can be a full-fledged J2EE Application server) can provide typical middleware services like caching, load balancing, logging, and auditing. 3. A single driver can handle any database, provided the middleware supports it.
  • 10. The type 4 driver, also known as the Direct to Database Pure Java Driver, that converts JDBC calls directly into a vendor- specific database protocol. This provides better performance than the type 1 and type 2 drivers as it does not have the overhead of conversion of calls into ODBC or database API calls. Unlike the type 3 drivers, it does not need associated software to work. As the database protocol is vendor specific, the JDBC client requires separate drivers, usually vendor supplied, to connect to different types of
  • 11. 1. Completely implemented in Java to achieve platform independence. 2. The client application connects directly to the database server. No translation or middleware layers are used, improving performance. 3. The JVM can manage all aspects of the application-to-database connection; this can facilitate debugging. 1. Drivers are database dependent, as different database vendors use widely different (and usually proprietary) network protocols.
  • 12. 1. If you are accessing one type of database, such as Oracle, Sybase, or IBM, the preferred driver type is 4. 2. If your Java application is accessing multiple types of databases at the same time, type 3 is the preferred driver. 3. Type 2 drivers are useful in situations, where a type 3 or type 4 driver is not available yet for your database. 4. The type 1 driver is not considered a deployment-level driver, and is typically used for development and testing purposes only.