Copy&Paste了一下午,終於一蹴而就此文,嘿嘿...
1.演變歷史
它們是按照這個時間先后的順序逐步出現的,史前->ODBC->OLEDB->ADO->ADO.Net。
看看Wiki上的MDAC定義:“Microsoft Data Access Components(MDAC)是微軟專門為數據訪問功能而發展的應用程序開發接口,做為微軟的統一化數據訪問(Universal Data Access; UDA)解決方案的核心組成,最初的版本在1996年時發表,其組成組件有ODBC,OLE DB以及ADO,其中ADO是在Visual Basic上唯一的數據訪問管道,而OLE DB則是基於COM之上,供C/C++ 訪問與提供數據的接口,ODBC則是統一化的數據訪問API。”
也就是說,ODBC, OLE DB, ADO都是這個解決方案的組件。
再看看這張調用圖,很多事情就不言自明了。(其實我覺得這圖有些不准確,.Net Managed Provider應該有條專線直通Data Stores, 這樣才能體現出Sql Server的性能優越性嘛...)

2.ODBC之前
事實上, 這幾乎都可以稱為史前了, 那時數據訪問是這個樣子滴...

總結一下就是:以前訪問oracle,就要用oracle 的api, 要訪問db2,就要用db2的api,這樣寫出來的代碼都是不一樣的,一旦領導層要更換數據庫,結果程序員就倒血霉了,這不是好方法,ODBC因此應運而生。
3.ODBC
算是較早期的數據訪問庫,現在已經過時, 但還偶有用處, 看下面圖片:

下面是其wiki描述:
"In computing, ODBC (Open Database Connectivity) is a standard C programming language interface for accessing database management systems (DBMS). The designers of ODBC aimed to make it independent of database systems and operating systems. An application can use ODBC to query data from a DBMS, regardless of the operating system or DBMS it uses.
ODBC accomplishes DBMS independence by using an ODBC driver as a translation layer between the application and the DBMS. The application uses ODBC functions through an ODBC driver manager with which it is linked, and the driver passes the query to the DBMS."
"ODBC defines a standard C API for accessing a relational DBMS. It was developed by the SQL Access Group in 1992 to standardize the use of a DBMS by an application. ODBC provides a universal middleware layer between the application and DBMS, allowing the application developer to use a single interface. If changes are made to the DBMS specification, only the driver needs updating. An ODBC driver can be thought of as analogous to a printer or other driver, providing a standard set of functions for the application to use, and implementing DBMS-specific functionality.
An application that can use ODBC is referred to as "ODBC-compliant". Any ODBC-compliant application can access any DBMS for which a driver is installed. Drivers exist for all major DBMSs and even for text or CSV files."
"An ODBC driver enables an ODBC-compliant application to use a data source, normally a DBMS. (Some non-DBMS drivers exist, for such data sources as CSV files. Such drivers implement a small DBMS.) ODBC drivers exist for most DBMSs, including Oracle, Microsoft SQL Server (but not for the Compact aka CE edition), Sybase ASE, and DB2.
Because different technologies have different capabilities, most ODBC drivers do not implement all functionality defined in the ODBC standard. Some drivers offer extra functionality not defined by the standard."
總結來說:ODBC可以搞定關系型數據庫.
4.OLE DB
先看圖吧!

總結來說: OLE DB的革新, 是它除了能處理關系型數據庫, 還能處理非關系型數據了, 如Excel, 這就比ODBC更加進步了.
5.ADO
看看下面的圖就明白了,一句話,ADO封裝了OLE DB。



Wiki說法:"Microsoft's ActiveX Data Objects (ADO) is a set of Component Object Model (COM) objects for accessing data sources. A part of MDAC, it provides a middleware layer between programming languages and OLE DB (a means of accessing data stores, whether they be databases or otherwise, in a uniform manner). “
一句話:ADO實際上是位於OLE DB頂部的一個附加層(也就是位於OLE DB與應用程序之間), 它封裝了OLE DB(精確的說是封裝了一個子集,但已經夠用了)
用ADO和OLE DB連接SQL數據庫的字符串寫法相同,都是: connstr="PROVIDER=SQLOLEDB; DATA SOURCE=servername;UID=xx;PWD=xxx;DATABASE=dbname"
只不過ADO的API好用,大家更加熟悉而已,其實,最后還是通過OLE DB來實現的。
6.ADO.Net
車輪滾滾,終於到了Ado.Net.
ADO.NET (ActiveX Data Objects for .NET) is a set of computer software components that programmers can use to access data and data services. It is a part of the base class library that is included with the Microsoft .NET Framework. It is commonly used by programmers to access and modify data stored in relational database systems, though it can also access data in non-relational sources. ADO.NET is sometimes considered an evolution of ActiveX Data Objects (ADO) technology, but was changed so extensively that it can be considered an entirely new product."
看下圖可知,System.Data.SqlClient與System.Data.OleDb的區別, 論性能,SqlClient訪問Sql Server最快,論通用性,還是要用OleDb。雖然沒有找到System.Data.Odbc的圖,但相信它和OleDB的類似。

7.ODBC與的OLE DB區別
前面已經寫過了, 再重申一下, ODBC只能處理關系型數據庫, OLE DB不僅能處理關系型數據庫, 還能處理非關系型數據庫, 如Excel等等.
推薦資料:
1.MDAC
http://zh.wikipedia.org/wiki/Microsoft_Data_Access_Components
2.ActiveX Data Objects
http://en.wikipedia.org/wiki/ActiveX_Data_Objects
3.ODBC
http://en.wikipedia.org/wiki/ODBC
4.ODBC、OLEDB、ADO、SQL的關系
http://www.cnblogs.com/yuanfubiao/archive/2010/12/22/1914149.html
5.ADO,OLEDB,ODBC,DAO的區別 .
http://blog.csdn.net/sunboy_2050/article/details/6624684
6.ADO.Net本質論
7.ADO與ADO.Net編程指南
