Summary

DB2 provides drivers for JDBC and SQLj. DB2 JDBC drivers come in two flavors: the app driver (Type II) and the net driver (Type III). The former uses JNI to invoke DB2 CLI libraries, and the latter uses a TCP/IP connection to communicate with a DB2 JDBC server. DB2 JDBC drivers support the JDBC 2.1 core functionality and some standard extensions functionality.

JDBC includes Connection objects for managing connections, Statement objects for executing SQL queries, and ResultSet objects for manipulating a cursor. In addition, DB2 JDBC 2.1 drivers provide additional support for LOBs, batch updates, scrollable cursors, JTA, and JNDI.

SQLj provides a static SQL alternative to JDBC's dynamic SQL interface. SQLj source files are translated into Java classes along with a profile that contains the SQL statements within the class module. The serialized profile is then statically bound using the db2profc tool. Finally, the SQLj application can run, calling these statically bound packages.

DB2 also provides support for Java stored procedures and UDFs. You can write your Java stored procedures in SQLj and in JDBC. For both stored procedures and UDFs, the SQLJ Routines standard can be followed to declare method entry points.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.168.203