📄 577.html
字号:
<STYLE type=text/css>
<!--
body,td { font-size:9pt;}
hr { color: #000000; height: 1px}
-->
</STYLE>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD><TITLE>论坛精华 >> JDBC >> JDBC Driver Types</title>
</head>
<body >
<p><IMG SRC="../image/jsp001_middle_logo.gif" WIDTH="180" HEIGHT="60" BORDER=0 ALT=""></p>
<table width=100% bgcolor="#cccccc" align=center cellpadding="2" cellspacing="0" border=1 bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr bgcolor="#EFF8FF"><td>
<a href=http://www.jsp001.com/list_thread.php?int_attribute=4>论坛精华</a>
>> <a href=http://www.jsp001.com/list_thread.php?forumid=24&int_attribute=4>JDBC</a>
>> JDBC Driver Types [<a href=http://www.jsp001.com/forum/showthread.php?goto=newpost&threadid=577>查看别人的评论</a>]<br>
<hr><p>由 george 发布于: 2001-03-03 03:53</p><p> </p><p><font color=blue>JDBC Driver Types</font><br><br>When you take an interview with a teamleader, the following question are always asked. <br>1)How many kinds of JDBC driver in java? <br>2)Which type do you use in your projects? <br>3)Whick kinds of driver are there in Oralce Database?<br>Now, I answer these questions by explaining the JDBC driver types as the followings.<br><br>Sun has defined 4 JDBC diver types:<br>JDBC-ODBC Bridge, plus ODBC driver<br>Native-API, partly-Java Driver<br>JDBC-net, pure Java driver<br>Native-protocol, pureJava driver<br><br>Each of these types meets a different application need.<br><br>Type1: JDBC-ODBC Bridge, plus ODBC driver<br>This driver type is provided bt SUn with he JDK1.1 and later.It provides JDBC access to database through ODBC drivers. The ODBC driver must be configured on the client for the bridge to work. This driver type is commonly used <font color=red>for prototying or when there is no other JDBC drivers availible for DBMS. see the following figure.<br><img src="../upload_image/664_1" border=0><br>Type 2:Native-API Driver<br>The native-API driver JDBC commands into DBMC-specific native calls. This is muck like the restriction of type 1 driver. The client must have some binary code loaded on its machine. These driver has better performance than type1 driver, becoz they interface directly with the database. see the figure.<br><img src="../upload_image/664_2" border=0><br>Type 3: JDBC-Net Pure Java Driver<br>The JDBC-Net drivers are a 3-tier solution.( I drew a skeleton of 3-tier solution in the last article)JDBC calls into a database-independent network protocol that is sent to a middleware server.This server then translates this protocol intoa DBMS-specific protocol, which is sent to a particular database. The results sre sent back to client by routing through middleware server. This tyoe makes it possible to implement a pure Java client. It also makes it possible to swap db without affecting the client. This is by far the most flexible JDBC solution.<br><img src="../upload_image/664_3" border=0><br>Type 4: Native-Protocol, pure JavaDriver<br>In morjority of chinese translated books, NATIVE is translated to seem like "local" or other meaning. I nmy view, it is an error. Native is not local and should be thought as other programs written by other languages other than JAVA. SO please pay attention to and understand the meaning of NATIVE. <br><br>This type is pure java driver that communicates directly with the vendor's database. They do this by converting JDBC commands directly into the databaseengine's native protocol. This type driver has a very distinct advantage over all the other driver types since it has not no addtional tranlation or middleware layers. <br><img src="../upload_image/664_4" border=0><br><br>In some intermediate scale projects, we should use the type4 drivers, since it has the best comprised performance than others. But if you want to do just a small project, the type 2 is a choice, becoz it uses native-API which have fast execution speed.<br><br><br></p></td>
</tr>
</table>
<p>
<CENTER><a href="http://www.jsp001.com/forum/newreply.php?action=newreply&threadid=577">点这里对该文章发表评论</a></CENTER>
<p>该文章总得分是 <font color=red>0</font> 分,你认为它对你有帮助吗?
[<a href=javascript:void(0) onclick=window.open("http://www.jsp001.com/forum/codeVote.php?threadid=577&intVote=4","","menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=70,height=40,top=0,left=0")>非常多</a>](<font color=red>0</font>)
[<a href=javascript:void(0) onclick=window.open("http://www.jsp001.com/forum/codeVote.php?threadid=577&intVote=2","","menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=70,height=40,top=0,left=0")>有一些</a>](<font color=red>0</font>)
[<a href=javascript:void(0) onclick=window.open("http://www.jsp001.com/forum/codeVote.php?threadid=577&intVote=1","","menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=70,height=40,top=0,left=0")>无帮助</a>](<font color=red>0</font>)
[<a href=javascript:void(0) onclick=window.open("http://www.jsp001.com/forum/codeVote.php?threadid=577&intVote=-1","","menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=70,height=40,top=0,left=0")>是灌水</a>](<font color=red>0</font>) </p>
<script language="javascript" src="http://www.jsp001.com/include/read_thread_script.php?threadid=577"></script>
<p><CENTER>
Copyright © 2001 - 2009 JSP001.com . All Rights Reserved <P>
<IMG SRC="../image/jsp001_small_logo.gif" WIDTH="85" HEIGHT="30" BORDER=0 ALT="">
</CENTER></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -