JDBC

JDBC stands for Java Database Connectivity. 
JDBC is pat of JDK. The core four JDBC interfaces are,
* Driver: Knows how to get a connection to the database
* Connection: Knows how to communicate with the database
* Statement: Knows how to run the SQL
* ResultSet: Knows what was returned by a SELECT query

JDBC resources should be closed in the reverse order from that in which they were opened. The order for opening is Connection, Statement, and ResultSet. The order for closing is ResultSet, Statement, and Connection. A Statement automatically closes the open ResultSet when another SQL statement is run.