Introduction to JDBC
JDBC is a database-independent application programming interface (API) for enabling the interaction between Java applications and a database. It was specified by the Oracle Corporation, and was first released with Sun JDK 1.1 in 1997.
JDBC does not implement any database-specific instructions by itself, but provides a common framework of interfaces against which the database vendors can implement a driver for a specific database. This enables a Java developer to write code that can be used to connect to any database that provides a JDBC driver without changing the implementation.
JDBC can be divided into four core components:
- JDBC driver: A collection of Java database-specific Java classes that implement the interfaces defined in JDBC
- Connections: Each connection object holds one connection to a database, and is responsible for all the communication with the database
- Statements: Statements and their subtypes are used to execute queries and updates on a database
- ResultSets...