Return to Homegeneral info-bulletjavadashsybase-technical training-instructors
training - java courses - advanced java courses


Java and Database Connectivity: JDBC

The Java JDBC API provides the capability to access existing database systems. It is an SQL-based interface using a model similar to that of Microsoft's ODBC, and can connect to databases through an ODBC bridge or through native drivers provided by database vendors. This module covers all the details that you need to use JDBC to access information in your legacy databases.

 

Topics include:
Distributed applications and database access
Overview of JDBC
The JDBC Architecture
The JDBC API
Class DriverManager and management of JDBC drivers
The JDBC/ODBC bridge driver
Naming databases with URLs and the jdbc protocol
Subprotocols and subnames
Connecting to databases and class Connection
Class Statement
Generating statements from connections
Executing queries
Class ResultSet
Retrieving results
Rows, cursors and columns
Class PreparedStatment
Creating and executing precompiled statements
IN parameters
Class CallableStatement
Executing stored procedures
IN, OUT, and IN/OUT parameters
Using metadata to get information about the database
The data types in the java.sql package
Mapping between SQL data types and Java data types

 

Lab Exercises
Setting up JDBC (JDK 1.02 only)
Connecting to a database
Loading a driver
Defining a URL
Creating a connection
Executing a simple SQL query
Creating a Statement object
Executing a query
Using ResultSet to retrieve query results
Executing an update query
Executing precompiled queries with PreparedStatment
Using ResultSetMetaData and DatabaseMetaData to get table and column info

 

|   return to top   |