JDBC - Type 2 Driver Last Updated : 23 Jul, 2025 Comments Improve Suggest changes 3 Likes Like Report A JDBC driver enables Java application to interact with a database from where we can fetch or store data. JDBC drivers are analogous to ODBC drivers. The JDBC classes are contained in the Java Package java.sql and javax.sql.JDBC helps to Connect to a data source, like a database.Send queries and update statements to the databaseRetrieve and process the results received from the database in answer to your query The Java.sql package that ships with JDK contain various classes with their behaviors defined and their actual implementations are done in third-party drivers. Third-party vendors implement the java.sql.Driver interface in their database driver. JDBC driver types are used to categorize the technology used to connect to the database.Type -1 Bridge driverType -2 Native APIType -3 Network ProtocolType -4 Native Protocol Type 2 or Partial Java driver: Also known as Native API converts JDBC calls into database-specific native libraries calls and these calls are directly understood by the database engine. This type of driver converts JDBC calls into calls on the client API for Oracle, Sybase, Informix, DB2, or other DBMS. Note that, like the bridge driver or Type-1 driver, Also this driver requires some binary code to be loaded on each client machine. JDBC driver directly talks to DB client using native APIIt required native API to connect to DB client it is also less portable and platform dependentType 2 drivers convert JDBC calls into database-specific calls i.e. this driver is specific to a particular database.Like Type 1 drivers, it’s not written in Java Language which forms a portability issue.If we change the Database we have to change the native API as it is specific to a database.It is not threaded SafeNo longer produced or used.Type-2 Drivers aren’t architecturally compatible This type of driver converts the calls that a developer writes to the JDBC application programming interface into calls that connect to the client machine’s application programming interface for a specific database, such as IBM, Informix, Oracle or Sybase. Create Quiz Comment S sam_2200 Follow 3 Improve S sam_2200 Follow 3 Improve Article Tags : Java JDBC Explore Java BasicsIntroduction to Java3 min readJava Programming Basics9 min readJava Methods6 min readAccess Modifiers in Java4 min readArrays in Java7 min readJava Strings7 min readRegular Expressions in Java3 min readOOP & InterfacesClasses and Objects in Java5 min readAccess Modifiers in Java4 min readJava Constructors4 min readJava OOP(Object Oriented Programming) Concepts10 min readJava Packages2 min readJava Interface7 min readCollectionsCollections in Java12 min readCollections Class in Java13 min readCollection Interface in Java4 min readIterator in Java4 min readJava Comparator Interface5 min readException HandlingJava Exception Handling6 min readJava Try Catch Block4 min readJava final, finally and finalize4 min readChained Exceptions in Java3 min readNull Pointer Exception in Java5 min readException Handling with Method Overriding in Java4 min readJava AdvancedJava Multithreading Tutorial3 min readSynchronization in Java7 min readFile Handling in Java4 min readJava Method References9 min readJava 8 Stream Tutorial7 min readJava Networking6 min readJDBC Tutorial5 min readJava Memory Management3 min readGarbage Collection in Java6 min readMemory Leaks in Java3 min readPractice JavaJava Interview Questions and Answers15+ min readJava Programs - Java Programming Examples7 min readJava Exercises - Basic to Advanced Java Practice Programs with Solutions5 min readJava Quiz1 min readJava Project Ideas For Beginners and Advanced15+ min read Like