For faster navigation, this Iframe is preloading the Wikiwand page for ODBC.

ODBC

此条目可参照英语维基百科相应条目来扩充。 (2022年8月3日)若您熟悉来源语言和主题,请协助参考外语维基百科扩充条目。请勿直接提交机械翻译,也不要翻译不可靠、低品质内容。依版权协议,译文需在编辑摘要注明来源,或于讨论页顶部标记((Translated page))标签。

ODBCOpen Database Connectivity,开放数据库互连)提供了一种标准的API应用程式编程接口)方法来访问数据库管理系统(DBMS)。这些API利用SQL来完成其大部分任务。ODBC本身也提供了对SQL语言的支持,用户可以直接将SQL语句送给ODBC。ODBC的设计者们努力使它具有最大的独立性和开放性。

历史

在ODBC诞生之前,如果要开发数据库应用程式,则必须要使用数据库厂商随数据库产品一同发布的一些工具集来访问数据库,或者在程序中使用嵌入式SQL来访问数据库。当时,对于访问数据库的方法,缺乏一个基于C语言的统一编程接口。在这种背景下,微软于1992年发表了ODBC。之后,X/Open组织以及ISO标准化组织基于ODBC 3.0的规范,进一步进行了标准化,于1995年发表了SQL/CLI标准。该标准已经成为了SQL标准的一部分。

版本历史:

实现

ODBC的运用形态通常是由应用程式经过一个称之为ODBC管理器的工具,创建一个DSN,指明需要调用的ODBC驱动程式,从而访问对应的数据库。对于用户的应用程式而言,ODBC驱动程式是相对不可见的。用户只需要在ODBC管理器中配置相应的数据库的数据源资讯,并登录相应的ODBC驱动程式即可。DSN分为三种:

  • 用户DSN
  • 系统DSN
  • 文件DSN

也可以用连接字符串而不需要事先创建DSN,例如

connstr="DRIVER={SQL SERVER};SERVER=servername;UID=xyz;PWD=xxx"
connstr="DRIVER={Microsoft Access Driver};SERVER=D:\abc\defg.mdb"

各个数据库厂商通常都为自己的数据库实现了ODBC驱动程式。从OracleDB2SQL ServerAccess数据库,都实现了面向各自数据库产品的数据驱动程式。

而对于ODBC管理器,目前主要存在以下几种实现:

Microsoft ODBC
微软提供的一个实现,目前在大部分Windows操作系统上可以找到它。
unixODBC
unixODBC项目为非Windows操作系统(如各版本的LinuxUnix以及Mac OS)提供的一个实现。unixODBC的实现涵盖了ODBC 3.0中的所有API规范,并且提供了一个类似于Microsoft ODBC那样的GUI形式的配置界面供用户进行数据源的配置。unixODBC的代码在GPL协议下公开,目前该项目是由Easysoft的Nick Gorham进行管理。unixODBC现在已经是很多Linux发行版的标准安装模式下的一个必要组件。
iODBC
iODBC项目(Independent Open DataBase Connectivity)的目标是提供一个平台无关的实现,该项目目前由Openlink Software进行管理。其代码是在LGPL协议以及BSD协议下发布。苹果公司从Mac OS X v10.2时代开始,便将iODBC绑定至Mac OS操作系统中。

参考文献

  1. ^ What's New in ODBC 3.8. Microsoft. [2010-01-13]. (原始内容存档于2010-01-11). Windows 7 includes an updated version of ODBC, ODBC 3.8. 
  2. ^ Rukmangathan, Krishnakumar. A new release of ODBC for Modern Data Stores. Microsoft Data Access / SQL BI Technologies Blog. Microsoft. 2016-06-07 [2022-05-10]. (原始内容存档于2019-01-15). After more than 15 years since the last release, Microsoft is looking at updating the Open Data Base Connectivity (ODBC) specification. 
  3. ^ History of the Desktop Database Drivers - Open Database Connectivity (ODBC). [2022-05-10]. (原始内容存档于2022-05-10). 

外部链接

参见

  • ADO(ActiveX Data Objects)
  • MDAC(Microsoft Data Access Components)
  • JDBC(Java Database Connectivity)
{{bottomLinkPreText}} {{bottomLinkText}}
ODBC
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?