Discuss JDBC Architecture in detail.Give me the content for 5 marks
Question
Discuss JDBC Architecture in detail.Give me the content for 5 marks
Solution
JDBC (Java Database Connectivity) is an API (Application Programming Interface) used to connect Java applications with Database to provide data persistence. It is part of the Java Standard Edition platform, from Oracle Corporation. It provides methods to query and update data in a database, and is oriented towards relational databases.
JDBC Architecture consists of two layers:
- JDBC API: This provides the application-to-JDBC Manager connection.
- JDBC Driver API: This supports the JDBC Manager-to-Driver Connection.
The JDBC API uses a driver manager and database-specific drivers to provide transparent connectivity to heterogeneous databases. The JDBC driver manager ensures that the correct driver is used to access each data source. The driver manager is capable of supporting multiple concurrent drivers connected to multiple heterogeneous databases.
There are four types of JDBC drivers:
-
JDBC-ODBC Bridge Driver: The JDBC-ODBC Bridge provides JDBC access via ODBC drivers. ODBC stands for Open Database Connectivity. It needs an ODBC driver to connect to the database.
-
Native-API Driver (partially Java driver): The Native API driver uses the client-side libraries of the database. The driver converts JDBC method calls into native calls of the database API. It is not written entirely in Java.
-
Network Protocol Driver (fully Java driver): The Network Protocol driver uses middleware (which can be a server) to convert JDBC calls directly or indirectly into the vendor-specific database protocol. It is entirely written in Java.
-
Thin Driver (fully Java driver): The Thin driver converts JDBC calls directly into the vendor-specific database protocol. That is why it is known as the thin driver. It is fully written in Java.
In conclusion, JDBC is a critical component in any Java-based application for data persistence. Its architecture and different types of drivers provide a flexible and scalable framework for interacting with various databases.
Similar Questions
What are the basic steps for JDBC connection, explain it with suitable program. give me the content for 5 marks
Purpose of JDBC
Which of the following are components of JDBC?a)JDBC-ODBC Bridge Driversb)JDBC Driver managerc)JDBC Test suited)All of the mentionede)JDBC API
_____ consists of a set of interfaces and classes written in the Java programming language.a)JDBC APIb)Embedded SQLc)Connection Poolsd)JDBC Architecture
______ helps a programmer to write a Java program to connect to a database, retrieve the data from the database, and perform various operations on the data in a Java program.a)All of the mentionedb)Embedded SQLc)JDBC APId)NoSQL
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.