The Difference and connection between ODBC and ole db.

Source: Internet
Author: User

Comparing ole db and ODBC

This document compares the basic features of ole db to the basic features of ODBC (Open Database
Connectivity). It is intended to help clarify when to use one over the other.

Introduction

Ole db and ODBC are both specifications created by Microsoft to address universal data access. Each is intended
As an industry standard that will make access between one vendor's data store and another vendor's data consumer
Seamless.
Microsoft's definition of ole db is

A strategic system-level programming interface to data transmission ss the Organization. OLE DB
Is an open specification designed to build on the success of ODBC by providing an open
Standard for accessing all kinds of data.

And the definition of ODBC is

(R) (R)
An industry standard and a component of Microsoft Windows open services
Architecture (wosa). The ODBC interface makes it possible for applications to access
Data from a variety of database management systems (dbmss). ODBC permits
Maximum interoperability-An application can access data in diverse dbmss through
Single interface. Furthermore, that application will be independent of any DBMS from
Which it accesses data. Users of the application can add software components called
Drivers, which create an interface between an application and a specific DBMS.

The two primary differences between the two are
* Ole db is a component based specification and ODBC is a procedural based specification
* SQL is the core of accessing data using ODBC but just one of the means of data access through OLE DB
* ODBC is constrained to relational data stores; ole db supports all forms of data stores (relational,
Hierarchical, etc)
In general, ole db provides a richer and more flexible interface for data access because it is not tightly bound to
Command syntax (like SQL in the case of ODBC). As Microsoft points out:

Whereas ODBC was created to access relational databases, ole db is designed
Relational and non-relational information sources, including mainframe isam/VSAM
And hierarchical databases; e-mail and file system stores; text, graphical, and
Geographical Data; custom business objects; and more.

ODBC on the other hand is a more established interface because it has been around longer; there are proven drivers
And applications available in the market place. ole db is creating a better known presence, but consumer support is
Probably still considered limited. With the release of Windows 2000 Professional, ole db will be installed as part
Of the operating system. In Microsoft Office2000 all member applications will be ole db consumers. When these
Two major products ship, ole db will be much more ensconced in the marketplace.
Thomas Cox does a good job of outlining ODBC's limitations in his Sugi paper "what's up with ole db? ". In
Recap they are:
* Tightly bound to the SQL language and relational data
* No standard leveling of functionality (I. e. drivers do not support standard levels of functionality)
* Each flavor of SQL makes each driver unique undermining the universal intent of the API
* Difficult to deploy due since into software pieces must be synchronized (server, driver, OS, etc)
Microsoft created ole db to address these issues and better support Internet Integration and multi-threading.

Political pros and cons

The debate over ODBC versus ole db boils down to two areas: political and technical.
In the political arena, we have the "because Microsoft said so" argument against the "Microsoft always changes their
Mind "counterpoint. Over the past two to three years, Microsoft has been heavily touting ole db as the successor
To ODBC. At PDC 98 they went as far as to state that there wocould no longer be continuing to develop ODBC (they
Wocould fix problems in their drivers, as needed, but not pursue future versions of the API). They plan to invest all
New development into ole db.
So the politically correct thing to tell a user that asks which technology is to start migrating their applications
Ole db because it is the industry ction:
* Ole db is Microsoft's answer to universal data access in all forms (rectangular, relational, hierarchical,
Multi-dimensional, etc .)
* With the next major release of Microsoft's flagship products (its operating systems, and office suite) Ole
DB will be fully integrated in Microsoft's desktop environment.
* Microsoft's RAD tools (VisualBasic, Visual C ++, Visual InterDev) currently support ole db.
In following this line of reasoning, we anticipate that our own ODBC drivers will eventually be replaced by Ole
DB providers. Users shocould consider when and how they may be able to migrate their applications from ODBC
Ole db if this trend is realized.

Technical pros and cons

Given the frequent political controversies around Microsoft's marketing decisions, it is also important (probably
More so than the political motivations !) To share the technical pros and cons between ODBC and ole db when
Talking to users:
* If the user wants to access data independently of the SQL language, he or she shoshould migrate to OLE DB.

As we have pointed out, ODBC is bound to the SQL language. If the user's problem can best be solved
Direct table manipulation, ole db is a better solution.
* If the user wants parallel interfaces for rectangular and multi-dimen1_data, he or she shoshould migrate
Ole db.

At present the only open industry standard for multi-dimen1_data is based on ole db. if the user has
A problem that involves the integration of these two forms of data, ole db is a better solution. It will
Reduce the amount of code needed.
* If the user wants to access data in an object server, he or she must migrate to ole db; there is no ODBC
Outlet.

There is no ODBC access to an IOM Object Server. The ole db provider that ships with this product is
Only way a user has to get to SAS data sets in such a server.
* If the user wants to access different data stores (local, share, IOM, etc) from a single application, he or
She shoshould migrate to ole db.

If the user plans to access data in an object server and any other data store, he shoshould consider migrating
Entire application to ole db. Otherwise he will be maintaining separate code paths for each access
Method. This argument is further supported by the theoretical idea that ole db has CES the likelihood
Differences between drivers, SQL dialects and dbmss that has been problematic among ODBC
Events.
* If the user wants to exploit as much of the SAS data model as possible from a thin-client application, he or
She shoshould migrate to ole db.

While ODBC is constrained by SQL, OLE DB is not. The OLE DB specification is much richer and more
Extensible than ODBC. We intend to develop our providers in future releases to encapsulate as much of
SAS data model as possible. To fully exploit this data model in a thin-client environment the user shoshould
Migrate to ole db.
* If the user needs the ability perform concurrent updates, he or she shoshould migrate to ole db.

To update records using the ODBC driver the user must issue SQL update statements which are
Basically batch oriented updates. There is no concept of record locking in the ODBC model. OLE DB
Accomodates several locking models that allow multiple concurrent updates. This feature of OLE DB
Enables the development of much more data management applications than with ODBC.

 

Original article: http://ftp.sas.com/techsup/download/v8papers/odbcdb.pdf

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.