• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 19. Serving and Connecting to Da... > Accessing Database Information Using...

Accessing Database Information Using ODBC

While Perl's DBI/DBD data abstraction can be used in many cross-platform database scripting solutions, it isn't available outside of Perl. A more universal approach to database abstraction is ODBC (Open Database Connectivity). Starting in Mac OS X 10.2, our favorite platform once again has ODBC support built into the operating system by way of the open source iODBC (Independent Open Database Connectivity) software. Before you get excited (or start scratching your head wondering what this is), let's answer a few of the obvious questions.

First, what is ODBC? ODBC is a programming API that allows developers to interact with many different types of databases without having to create custom code for each system. Each database is made accessible by downloading and installing a driver, which plugs into an ODBC manager and hides the details of the server from the programmer and user. There are numerous alternatives to ODBC—such as JDBC (Java), Apple's own Enterprise Objects Framework, and Perl's DBI module, which you just read about. So, with all these different APIs, each doing something similar, why do we need ODBC? ODBC is (one of) Microsoft's standards for database connectivity. It is widely used on the Windows platform and is an accepted developer standard. Is it better than the other options? Nope—but that hasn't stopped other software supported by a monopolistic company from becoming the standard. The Tiger-included iODBC software is a free implementation of the ODBC standard (http://www.iodbc.org).


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint