JDBC Driver
1) JDBC-ODBC bridge driver
In Java 8, the JDBC-ODBC Bridge has been removed.Oracle does not support the JDBC-ODBC Bridge from Java 8. Oracle recommends that you use JDBC drivers provided by the vendor of your database instead of the JDBC-ODBC Bridge. Advantages:
Disadvantages:
2) Native-API driver
Advantage:
Disadvantage:
3) Network Protocol driverThe Network Protocol driver uses middleware (application server) that converts JDBC calls directly or indirectly into the vendor-specific database protocol. It is fully written in java. Advantage:
Disadvantages:
4) Thin driver
Advantage:
Disadvantage:
JDBC driver MCQ1. Which type of JDBC driver is known as the "Pure Java" driver and directly converts JDBC calls to database-specific calls?
Answer: D) Explanation: Type 4 drivers are known as "Pure Java" drivers because they are implemented entirely in Java and convert JDBC calls directly into database-specific calls. 2. Which JDBC driver type uses native code and is platform-dependent, making it less portable?
Answer: B) Explanation: Type 2 drivers use native libraries specific to the database, making them dependent on the platform and less portable. 3. Which of the following JDBC driver types is considered the most flexible but also the slowest due to the number of translations needed?
Answer: A) Explanation: Type 1 drivers are bridge drivers that convert JDBC calls to ODBC calls, which are then translated to database-specific calls. Due to multiple layers of translation, they are the slowest drivers. 4. What is the main disadvantage of using a Type 3 JDBC driver in a three-tier architecture?
Answer: D) Explanation: Type 3 drivers use a middleware server that translates JDBC calls to database-specific calls, making configuration and maintenance more complex. 5. Which JDBC driver type is most suitable for web applications that need to be platform-independent?
Answer: D) Explanation: Type 4 drivers are entirely written in Java, making them platform-independent and suitable for web applications that require high portability. Next TopicSteps To Connect To The Database In Java |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India