×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Perl Database Resources

How can I use Perl to interact with my database? by hmerrill
Posted: 5 Jan 01 (Edited 1 Oct 02)

Quoting from "Programming the Perl DBI" book by Alligator Descartes & Tim Bunce,

   "The DBI is the standard interface for the Perl
     programming language.  The DBI is database-
     independent, which means that it can work with just
    about any database, such as Oracle, Sybase,
     Informix, Access, MySQL, etc."

The main Perl DBI web page is:

   http://dbi.perl.org

On that page you will find many great resources to get you going with DBI.
However, that page does not provide a way to download the DBI and related
DBD modules - for that see below.

For downloading,
   * find the Perl Database Interfaces page at

       http://search.cpan.org/modlist/Database_Interfaces

   * the DBI module is on that same page - just click
     on the "DBI" link - it will take you to the general
     "DBI" page - this page has loads of excellent information.

     Notice at the top of this page, the title looks like

         Tim Bunce >  DBI-1.30 >  DBI

     Click on the latest version(DBI-1.30) link to go to
     the...latest DBI version page.  On that page you will
     be able to download the current version.  That page
     also lists links to other DBI modules and documenation.

   * and find all the DBD(database specific) modules at

      http://search.cpan.org/modlist/Database_Interfaces/DBD

You'll need at least the "DBI" module, and the "DBD" module corresponding to your particular database, to get started.

One of the great things that the Perl DBI does for you is gives you
portablility - you write your code to the DBI spec, and with very few
changes, you can change the database from MySQL to Oracle(or whatever),
and that same DBI code will still work.  Of course that's assuming that
you keep your SQL along "standard" lines, and you don't take advantage
of the "non-standard" features that your database might offer.

Back to Perl FAQ Index
Back to Perl Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close