JDBC驱动程序类型编号之间的差异 [英] Difference between JDBC Driver type numbers
本文介绍了JDBC驱动程序类型编号之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
- 我在Java中是非常新的,当我通过JDBC部分时,我注意到JDBC有不同的驱动程序1驱动程序
- 类型2驱动程序等到类型4
为什么他们得到类型1,类型2等名称..有什么逻辑吗? >
解决方案
类型号说明了驱动程序数据库。
- 通过 ODBC API 。
- 通过数据库供应商特定的API(使用
- 通过通用网络协议(使用 JNI calls on example a DLL file in Windows) //docs.oracle.com/javase/tutorial/networking/sockets/rel =nofollow noreferrer> sockets 与例如TCP / IP协议)。
- 通过数据库(仍然具有套接字)。
一般来说(只是巧合),类型数字有多高, JDBC驱动程序执行。
I am very new to Java, when i was going through the JDBC section, i noticed that JDBC has different Drivers like
- Type 1 Driver
- Type 2 Driver etc.. to Type 4 Why did they get the name like Type 1, Type 2 etc.., Is there any logic?
解决方案
The type number tells something about how the driver actually communicates with the database.
- Via ODBC API.
- Via DB vendor specific API (using JNI calls on e.g. a DLL file in Windows).
- Via generic network protocol (using sockets with e.g. TCP/IP protocol).
- Via DB vendor specific network protocol (still with sockets).
In general (just by coincidence), how higher the type number, how better the JDBC driver performs.
这篇关于JDBC驱动程序类型编号之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文