Free JDBC Pocket Reference Ebook

Download free programming, computer, it, technology books

Jan
04

JDBC Pocket Reference

Posted by admin

The JDBC Pocket Reference offers quick look-ups for all methods of the standard JDBC classes. These include concise reviews of the procedures for common JDBC tasks such as connecting to a database, executing stored procedures, executing DDL and the like.

You’ll find documentation of the connect string formats for the most common databases, including Oracle, SQL-Server, and PostgreSQL. You’ll even find information on working with large objects, and on using SQL99 user defined datatypes to work with object-relational data. Searching for this sort of material through large tutorials is frustrating and a waste of time, but this pocket-sized book is easy to take anywhere and makes finding the information you need a snap.

User-defined data types (UDTs) bring the world of objectorientation to relational databases. Using UDTs you can create an object-relational database, or objectbase, in which an object model can be directly implemented in the persistence layer. To store and retrieve UDTs, you can either manipulate them as SQL STRUCTs and ARRAYs (which I will not show here), or you can define Java classes that are mapped to the SQL UDTs, which you then use to materialize the UDTs in your Java program.

Java classes that will be used to materialize a UDT need to implement the SQLData interface. Most databases that support UDTs also provide a tool to generate Java classes that implement SQLData. Implementing the SQLData interface consists of coding three methods. The first, getSQLTypeName( ), needs to return the fully qualified name of the UDT as it exists in the database. The second, readSQL( ), reads your class attributes from an SQLInput stream in the order they exist in the UDT. The third, writeSQL( ), writes the values of your class attributes onto the SQLOutput stream in the order they exit in the UDT.

Download JDBC Pocket Reference

Add A Comment