Perl
  Home arrow Perl arrow Perl and DBI
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
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? 
PERL

Perl and DBI
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 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:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb 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

    Create a Highly Available Database Solution. Advantage Database Server can provide the availability to keep your data safe and ready for your application and users.

    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


       · This article is an excerpt from the book "Beginning Perl," published by Apress. We...
     

    Buy this book now. This article is excerpted from chapter 15 of the book Beginning Perl (Apress; ISBN: 159059391X). Check it out today at your favorite bookstore. Buy this book now.

       

    PERL ARTICLES

    - Perl: Another Round with Hashes
    - Perl Hashes
    - Perl Lists: A Final Look at List::Util
    - Perl Lists: Utilizing List::Util
    - Perl Lists: The Split() Function
    - SQL and CGI with Perl and DBI
    - Perl Lists: More Functions and Operators
    - SELECT Queries and Perl
    - Perl Lists: More on Manipulation
    - Creating a Database with Perl and DBI
    - Perl: Sailing the List(less) Seas
    - Perl and DBI
    - Perl: Concatenating Text and More
    - Perl Text: Quoting Without Quote Marks
    - Perl: Releasing Your Inner Textuality




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway