JDBC and Connector/J 14 In a Type 1 (J2ee web hosting)

JDBC and Connector/J 14 In a Type 1 driver, a JDBC bridge is used to access ODBC drivers installed on each client machine. (This is the JDBC-ODBC Bridge we discussed earlier.) From the standpoint of Java, this is merely a stopgap solution until a Java-based JDBC driver can be obtained. In a Type 2 driver, JDBC API calls are converted and supplied to a vendor- specific driver. Used in the same manner as the JDBC-ODBC Bridge, the vendor-specific driver must be installed on each client machine. These drivers suffer the same problems found in a bridge situation. In a Type 3 driver, a pure Java-based driver translates API calls into a DBMS- independent network protocol, which is further translated by a server to a vendor-specific protocol. In a Type 4 driver, a pure Java-based driver translates API calls directly into the protocol needed by a vendor s database. This is the highest performance driver available for the database and is usually provided by the vendor itself. MySQL s Connector/J driver is a Type 4 driver. SQL Standards The standardization of access to a database has been a hot topic in recent years. The standard is called Structured Query Language, or SQL. Although the idea of a standard is appealing, not all database vendors follow the standard, and some cannot because of the feature set of the database itself. SQL92 used to be the defining specification for SQL, but recently a new standard called SQL99 has been adopted. The JDBC version 3.0 specification is designed to support SQL99. When working with different database systems through JDBC, you can be relatively sure that basic functionality like SELECT, INSERT, UPDATE, and DELETE will work without much change. Beyond the basics, though, getting SQL working from one database to another requires some effort on your part. By far the most important issue facing standardization is data typing. As you have probably already experienced in your development history, data types between C, C++, Java, PHP, and others can be quite different, especially in the area of data and time. Combine these differences with the various data types that can be stored in a database and you have the makings of a problem. In Chapter 7, MySQL Type Mapping, we cover the JDBC data types and how they are represented in MySQL and subsequently with a Java application. Another issue facing standardization is the use of quotes within SQL statements. JDBC attempts to handle this by using escaping and by requiring vendors to implement the escaping as appropriate for their databases.
Note: If you are looking for cheap and quality provider to host and run your java application check Astra java hosting services

Comments are closed.