Discussion RoomCategory: Database&SQLWhat are different types of JDBC Drivers?
Ram asked 4 years ago

What are different types of JDBC Drivers?

There are four types of JDBC drivers.
JDBC-ODBC Bridge plus ODBC Driver: It uses ODBC driver to connect to database. We should have ODBC drivers installed to connect to database, that’s why this driver is almost obsolete.
Native API partly Java technology-enabled driver: This driver converts JDBC class to the client API for the database servers. We should have database client API installed. Because of extra dependency on database client API drivers, this is also not preferred driver.
Pure Java Driver for Database Middleware: This driver sends the JDBC calls to a middleware server that can connect to different type of databases. We should have a middleware server installed to work with this driver. This adds to extra network calls and slow performance and thats why not widely used JDBC driver.
Direct-to-Database Pure Java Driver: This driver converts the JDBC calls to the network protocol understood by the database server. This solution is simple and suitable for database connectivity over the network. However, for this solution, we should use database specific drivers, for example OJDBC jars by Oracle for Oracle DB and MySQL Connector/J for MySQL databases.