Before you can execute SQL statements in any SQL program, you must be connected to a data source.
The IBM® Data Server Driver for JDBC and SQLJ supports type 2 and type 4 connectivity. Connections to DB2® databases can use type 2 or type 4 connectivity. Connections to IBM Informix® databases can use type 4 connectivity.
The following figure shows how a Java™ application connects to a data source using IBM Data Server Driver for JDBC and SQLJ type 2 connectivity.
The following figure shows how a Java application connects to a data source using IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.