Goseeko blog

What is Java Database Connectivity?

by Bhumika

The abbreviation for Java Database Connectivity (JDBC) is Java Database Connectivity. JDBC is a Java API that allows you to connect to a database and run queries on it. It’s a feature of JavaSE (Java Standard Edition). JDBC drivers are using the JDBC API to connect to a database.

Additionally, It is a database-independent Java API for connecting the Java programming language to a wide range of databases. The JDBC library has APIs for each of the operations listed below that are frequently associated with database usage.

Connecting to a database

  • It’s a typical task to write SQL or MySQL statements.
  • Execute SQL or MySQL queries in the database.
  • The records that result are view and edited.

Application of java database connectivity

It is a specification that defines a complete set of interfaces for accessing an underlying database from a mobile device. Moreover, Java can uses to create a variety of executables, including

  • Java Applications
  • (JSPs) Java ServerPages
  • Java Servlets
  • Enterprise JavaBeans (EJBs)
  • Java Applet

Moreover, All of these executables can utilize a JDBC driver to connect to a database and use the information contained there.

Similarly, It is similar to ODBC in that it permits database-independent code to be include in Java programs.

JDBC Drivers

The Type 1 JDBC driver is the bridge between JDBC and ODBC. In addition, there are four different categories, with the following distinctions:

  • The Type 4 JDBC driver is develop entirely in Java and communicates with the database via a network connection. This is also known as the JDBC thin driver.
  • The Type 3 JDBC driver interfaces with a relational database after first interacting with a middleware server such as IBM WebSphere. The JDBC proxy driver is another name for this.
  • The Type 2 JDBC driver, which can be develop in Java or not. To maximize performance and throughput, these drivers generally include proprietary code written particularly for a given database. The thick JDBC driver is the name give to this driver.
  • The Type 1 JDBC driver is the JDBC-ODBC bridge.

Interested in learning about similar topics? Here are a few hand-picked blogs for you!

You may also like