Java database connectivity (JDBC) is API (Application programming interface), provides interface between relational database and java programming. It helps us to accessing database from JSP pages. JDBC is part of java standard edition J2SE, JDK 1.1 as JDBC 1.0 version, JDK 1.4 includes JDBC API 3.0 version, and currently J2SE Java Platform Standard Edition 6 includes JDBC API 4.0 version. JDBC is set of classes and interface, which are in java.sql package. Most of web-application needs database in backend.
JDBC Steps of Processing
1. Create a Connection
2. Load JDBC Driver
3. Open database Connection
4. Create Statement/PreparedStatement for executing query
5. Create ResultSet
6. Fetch Data from ResultSet
7. Close Statement
8. Close ResultSet
9. Close Connection
|