A Typical JDBC API Usage Sequence


The JDBC API makes it possible to do three things: The following tasks connect to and query a database from the client:

  1. Import packages.
  2. Register the JDBC drivers.
  3. Open a connection to a database.
  4. Create a statement object.
  5. Execute a query and return a result set object.
  6. Process the result set.
  7. Close the result set and statement objects.
  8. Make changes to the database.
  9. Commit changes.
  10. Close the connection.
You must supply Oracle driver-specific information for the first three tasks, which allow your program to use the JDBC API to access a database.