JDBC - Java Database Connectivity.
JDBC provides API or Protocol to interact with different databases which is a standard Java API for database-independent connectivity between the Java programming language and a wide range of databases.
We can connect with different types of databases with the help of JDBC driver .
To establish connection with any database we must need driver.
A driver works as an interface between the
client and a database server.
JDBC have so many classes and interfaces that allow a java application to send request made by user to any specific DBMS(Data Base Management System).
JDBC supports a wide level of portability.
JDBC provides interfaces that are compatible with java application.
The JDBC library includes APIs for each of the tasks commonly associated with database usage:
- Making a connection to a database
- Creating SQL or MySQL statements
- Executing that SQL or MySQL queries in the database
- Viewing & Modifying the resulting records
Fundamentally, JDBC is a specification that provides a complete set of interfaces that allows access to an underlying database. Java can be used to write different types of executables,
such as:
- Java Applications
- Java Applets
- Java Servlets
- Java ServerPages (JSPs)
- Enterprise JavaBeans (EJBs)
All of these different executables are able to use a JDBC driver to access database and take advantage of the stored data.
JDBC provides the same capabilities or ODBC, allowing Java programs to contain database-independent code.