home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomeProgramming the Perl DBISearch this book

Chapter 7. ODBC and the DBI

Open Database Connectivity, commonly known as ODBC , defines a database-independent API. The ODBC Driver Manager supports the API and manages one or more plug-in drivers for talking to different types of databases. The architecture is shown in Figure 7-1.

Figure 7-1

Figure 7-1. The ODBC architecture

Doesn't this all sound rather familiar? The ODBC driver manager and drivers are doing just what the DBI and its drivers are doing: defining and implementing a database-independent, application-programming interface.

This leads us to a whole bunch of questions: What's the difference? Why not just use ODBC and not the DBI? Can the DBI and ODBC work together? What advantages does one have over the other?

Before we try to answer those questions, let's get some perspective by looking into the history and goals of ODBC and the DBI, and take a look at the Win32::ODBC module, which implements a direct interface to ODBC for Perl.



Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.