What is ADO? - Existing Technologies
(Page 3 of 12 )
Before I explain why ADO came about, I’ll quickly describe some existing technologies and show you how they fit into the picture.
- DB-Library (DBLib): This is the underlying technology for connecting to SQL Server. It is primarily designed for C, but is often used in Visual Basic. Because it is specific to SQL Server, it is extremely fast and functional. For this very reason, however, it doesn’t allow access to any other source of data. Other databases, such as Oracle and Sybase, have similar native communication libraries.
- ODBC: Open Database Connectivity (ODBC) was the first step on the road to a universal data access strategy. ODBC was designed (by Microsoft and other database management system [DBMS] vendors) as a cross-platform, database-independent method for accessing data in any relational database through the use of an Application Program Interface (API), known as the ODBC API. Although ODBC was designed for multidatabase use, it is often used only on single relational databases. From a programmer’s point of view, ODBC, like DBLib, is also complex to use because it was a low-level library. ODBC is also restricted to data sources that support SQL, and is therefore not suitable for non-SQL based data stores, although ODBC Drivers exist that allow access to text files.
- DAO: The Data Access Objects (DAO), introduced with Microsoft Access, provided a strictly hierarchical set of objects for manipulating data in Jet and other Indexed Sequential Access Method (ISAM) and SQL databases. These objects were first available with Visual Basic 3.0 and quickly became the most commonly used data access method for early Visual Basic programs. DAO also had the advantage of being able to sit on top of ODBC, which allowed it to communicate with many different databases.
- RDO: Aimed as the successor to DAO for Visual Basic programmers, Remote Data Objects (RDO) is a thin layer that sits atop ODBC to allow better access to server databases, such as SQL Server. This brought the flexibility of ODBC with a much easier programming model than DBLib or the ODBC API, but like DAO it has a strictly hierarchical programming model.
RDO also brought the world of remote database servers to the world of many programmers. RDO and ODBC share the same relationship as ADO and OLE DB: a thin layer on top of an underlying data access mechanism.
- ODBCDirect: An extension to DAO, ODBCDirect combined portions of DAO and RDO. It allows programmers to use the DAO programming model and also allows access to ODBC data sources without having the Jet database engine loaded.
- JDBC: Java Database Connectivity ( JDBC) was designed as another DBMS-neutral API especially for use in Java applications.
The problems with these technologies are very simple. DBLib and ODBC are low-level APIs and therefore, for many programmers, are complex to use. DAO and RDO offer the user another interface to ODBC, but this introduces another layer of code to go through, which can decrease performance. Moreover, all these technologies suffer from a very strict and hierarchical model, which adds extra overhead to programming and execution.
They are also more or less constrained to providing access to relational databases, although Microsoft Excel and simple text documents could also be used as data sources when using ODBC. ODBC drivers have also been produced for object-oriented and hierarchical databases to expose the data in a relational form with rows and columns.
What Is OLE DB? OLE DB is designed to be the successor to ODBC. You might be asking, why do we need a successor? Well, there are three main trends at the moment. The first, fairly obviously, is the Internet. The second is the increasing amount of data being stored in a nonrelational form, such as Exchange Server and file systems. The third is Microsoft’s desire for a world in which all object usage is handled through their Component Object Model (COM). In fact, OLE DB encourages the use of componentization, allowing database functionality and data handling to be encapsulated into components.
Because of its distributed nature, the Internet brings a different aspect to standard data access. Applications are now being written on a truly global scale, and you can no longer guarantee that the data you access is stored on your local network. This means that you need to consider carefully the way you access data and the type of data you access. The new business opportunity of e-commerce has meant that selling becomes a whole new ball game—you can now have an application that shows pictures of your products, plays music, and even videos, all running over the Web. The Web is also more distributed (and often less reliable) than conventional networks, so your data access method must take this into account. You can’t, for example, assume that your client and server remain connected at all times during an application; in the stateless nature of the Web, this doesn’t make sense.
OLE DB is a technology designed to solve some of these problems, and over time it will gradually replace ODBC as the central data access method. OLE DB is the guts of the new data access strategy, but because it allows access to existing ODBC Data Sources, OLE DB provides an easy migration path.
This is from ADO Programmer's Reference, by Dave Sussman (Apress, ISBN 1590593421). Check it out at your favorite bookstore today. Buy this book now. |
Next: Why ADO? >>
More ASP.NET Articles
More By Apress Publishing