Description
Java Database Connectivity (JDBC) is a Java API which is used to connect and execute query to the database.
API stands for Application programming interface which is a document which contains a description of all the features of a product (software). It shows classes and interfaces that software programs can follow to communicate with each other. An application programming interface (API) can be created for applications, libraries, operating systems etc.
That JDBC API uses Java Database Connectivity drivers to connect to the database.
The Java Database Connectivity API can access any kind of tabular data, mainly data stored in a Relational Database.
Java Database Connectivity (JDBC) works with Java on various platforms, such as Windows, Mac OS, and the various versions of UNIX.
JDBC provides a complete set of interfaces that allows for portable access to a basic database.
JDBC provides the same efficiency as ODBC which allowing Java programs to contain database independent code.
The JDBC library consists of APIs for each of the tasks commonly associated with database usage:
Making or creating a connection to a database
Creating SQL or MySQL statements
Executing that SQL or MySQL queries in the database
Viewing & Modifying the resulting records
Java Database Connectivity (JDBC) Architecture:-
The JDBC API supports two processing models namely two-tier and three-tier for database access. But in general, JDBC Architecture consists of two layers:
i) JDBC API: This provides the application to JDBC Manager Connection.
ii) JDBC Driver API: This supports the JDBC Manager to Driver Connection.
The JDBC API use a driver manager and database specific drivers to give transparent connectivity to heterogeneous databases.
The JDBC driver manager assures that the correct driver is used to access each and every data source.
The driver manager is proficient in supporting multiple concurrent drivers connected to multiple different databases.
Java Database Connectivity (JDBC) drivers are of 4 types-
1) JDBC-ODBC bridge driver
2) Native-API driver or partially-java driver
3) Network protocol driver or fully-java driver
4) Thin driver or fully-java driver
(Duration:- 1h 19m)