Click to return Home

  Newsreel
  Products & Services
  Web Watch
  Software Update
  Resource Directory
  Events Diary
  Articles
  The Magazine
  Subscribe
  Contact Us

  Advertisers

TechEd 2000

  TechEd reports
  Exhibitors
  Fun stuff

techeu99.gif (12847 bytes)



OLE DB 2.5

July 8 - With OLE DB 2.1, data-driven client/server applications deployed over the Web or a LAN could already easily integrate information from a variety of sources, both relational (SQL-based) and non-relational. With OLE DB the data access strategy changes significantly. You have to move your code to meet the data wherever it resides. It's no longer acceptable to ask customers to migrate their data to meet the code. You use OLE DB as a universal key capable of accessing any data source for which there exists an OLE DB COM-based provider.
    Version 2.1 of OLE DB has a noteworthy omission: it supports only tabular data formats. The elementary unit of information managed by an OLE DB provider is the rowset, defined as a collection of identical rows of data. As you can imagine, not all the enterprise data types can be easily modeled in terms of rectangular tables.

New Features in OLE DB 2.5
The new stuff in OLE DB 2.5 can be summarised in a couple of points: support for semi-structured data, and URL binding. OLE DB 2.5 lets you manage data either in tabular or non-tabular format, and provides a URL-based alternative to connection strings and command texts. This feature, known as direct URL binding, brings you an immediate advantage: you don’t need to know details about the provider. Use a URL-based description of the data source you want to access and a new OLE DB service will do the rest, returning a pointer to the object you referenced.

The Row Object
OLE DB 2.5 introduces the row object, which is an OLE DB object that contains a set of columns of data. A row object can be a row in a rowset, the result of a singleton SQL query, or a node in a tree-structured namespace, such as a file in a directory or a message in a mail folder. With this object the granularity of the OLE DB object model is now finer. With OLE DB 2.1 you stopped at the rowsets; now you can go one more level down and manage rows as individual objects.
    A column in a row can contain streams other than simple data types. A stream is rendered through the IStream Com interface and contain compound data such as documents and COM objects.

Direct URL Binding
As of version 2.1, your consumer applications needed to know the details (name, progID, connection details, query syntax) about the provider in order to successfully dialog with it. This has been simplified using a URL-based syntax. In practice, the consumer specifies a URL that addresses a specific provider's object, be it a command, a session, a rowset or a row. The URL scheme is completely up to the provider's writer. For example, if you have a module to access your email, you can design a URL like this:

http://MySimpleMapiProvider/Inbox/senderName="John Bogus"

to retrieve all the email received by the specified user.

Summary
OLE DB 2.5 provides the means to manage semi-structured, non-rectangular data in the same way as relational data. Since OLE DB is based on COM it makes an extensive use of interfaces and this can be bothersome for programmers. Direct URL binding is a great step forward since it hides much of the programming complexity. However, for a simplified use look also at ADO 2.5 and an integration with ATL that's still to come.

Dino Esposito

Full Transcript of Dino's TechEd session about OLE DB. More

 

 










Related Links

Article: Universal Data Access

Full Transcript: Dino's TechEd 99 session on OLE DB