Home           J2EE Concepts           JMS           Java Language           Contact           Back           Next           Bookmark this Page          










Some useful tips related to:
 - health & fitness
 - vehicle care
 - cooking
 - misc household tasks

JDBC Basics


JDBC:
- is an API for accessing databases using Java Language
- stands for Java Database Connectivity

Terms used in JDBC:
Database Driver - The code (set of classes) that can convert your java code (i.e. jdbc code) to a format that database understands, and vice versa.
The driver (typically a jar file) must be in your classpath in order to execute the jdbc code.
Connection - java.sql.Connection is a JDBC class, that represents actual connection established between your program and the databse. You can also think of it as a session.
Statement - java.sql.Statement is another JDBC class that represents an object used for executing a static SQL query & optionally returning a result.
Query - A string in your code that gets translated to a database query. Typically, this query would be same as the one executed on your database console, but this may not always be true. There might exist few minor syntatctical changes.
Resultset - java.sql.Resultset represents a JDBC class that holds any results returned by your query (if any). The result would typically be a table of data.