Professional Documents
Culture Documents
JDBC
JDBC:
• JDBC stands for “Java Database Connectivity”.
• JDBC is a specification from Sun Microsystems that provides a
standard abstraction (API/protocol) for Java applications to
communicate with different databases.
• It is used to write programs required to access databases.
• JDBC, along with database driver, is capable of accessing
databases and spreadsheets.
JDBC DATABASE
• JDBC can also be defined as a platform-independent interface
between a relational database and the Java programming
language.
• The JDBC can also have parts, they are:
1. JDBC API
2. JDBC Driver
• The enterprise data stored in a relational database can be
accessed with the help of JDBC APIs.
• Driver
• Connection
• Statement
• PreparedStatement
• CallableStatement
• ResultSet
• DatabaseMetaData
• ResultSetMetaData
• SqlData
• Blob
• Clob
• The DriverManager in the JDBC API plays an important role in the
JDBC architecture.
• It uses some database-specific drivers to effectively connect
enterprise applications to databases.
• The below will demonstrates the JDBC architecture:
• The java application that needs to communicate with a database
has to be programmed using JDBC API.
• The JDBC driver (third-party vendor implementation) supporting
data source, such as Oracle and SQL, has to be added in the java
application for JDBC support, which can be done dynamically at
run time.
• The communication for any data source takes place through
JDBC, we need a JDBC driver.
•
• 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.
• Currently, there are 220 JDBC drivers available in the market,
which are designed to communicate with different data sources.