Perl
  Home arrow Perl arrow Perl and DBI
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Forums Sitemap 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
PERL

Perl and DBI
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 2
    2008-03-14


    Table of Contents:
  • Perl and DBI
  • Introduction to Relational Databases
  • The Relational of Relational Database
  • We Need an SQL Server—MySQL

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Perl and DBI
    (Page 1 of 4 )

    Databases are a mission-critical part of any company's resources. If you program in Perl, you'll want to learn about the DBI, which can help you connect to many popular databases. This article, the first part of a series, is excerpted from chapter 15 of the book Beginning Perl (Apress; ISBN: 159059391X).

    It is now time to talk about one of Perl’s best modules: the Database Independent (DBI) module.DBIprovides an easy-to-use and portable (both across operating systems and across databases) application programming interface (API) that allows us to connect to a wide variety of databases including Oracle, Sybase, Informix, MySQL, mSQL, Postgress, ODBC, and many others, even files with comma-separated values (CSV). With this module we can access and administer databases from our Perl programs, combining the power and enjoyment of Perl with the usefulness of databasing information.

    In this chapter we will introduce the concept of SQL and discuss the most common ways to use it. Then we will discussDBIand the relatedDBD(Database Driver) modules. We will then write some Perl code to access and update a MySQL database. Finally, we will take our newfound knowledge and connect it with our topic from the last chapter and create a simple web interface to a database by combining Perl,DBIand CGI. This sounds like fun, so let’s get to it.

    Structured Query Language (SQL, pronounced as “EssQueueEl” by most and “Sequel” by some) is a language allowing a programmer access to a relational database. It is relatively easy to use—compared to Perl, learning SQL is a snap. We will talk about some of the most common SQL queries, or commands that access a database, and in talking about them we will describe the language to the point that learning the remaining details will be simply a matter of referring to an SQL book or website.

    But we are getting ahead of ourselves. Before we can talk about SQL we need to discuss relational databases.



     
     
    >>> More Perl Articles          >>> More By Apress Publishing
     

       

    PERL ARTICLES

    - More Perl Bits
    - Perl, Bit by Bit
    - Basic Charting with Perl
    - Using Getopt::Long: More Command Line Option...
    - Command Line Options in Perl: Using Getopt::...
    - Web Access with LWP
    - More Templating Tools for Perl
    - Site Layout with Perl Templating Tools
    - Build a Perl RSS Aggregator with Templating ...
    - Looping, Security, and Templating Tools
    - Perl: Bon Voyage Lists and Hashes
    - Templating Tools
    - Perl: Number Crunching
    - Perl Debuggers in Detail
    - Debugging Perl



     



    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 10 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek