Perl DBI

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

In computing, the Perl DBI (Perl Database Interface) offers a standardized way for programmers using the Perl programming language to embed database communication within their programs. The latest DBI module for Perl from CPAN can run on a range of operating systems.

History

In September 1992, Buzz Moschetti, creator of interperl, observed that several bespoke compiled extensions of perl (at the time, perl version 4 or more commonly perl4) featuring connectivity to popular SQL-based databases had emerged, namely Interbase, Informix, Oracle, and Sybase. He engaged the authors of these bespoke versions [1] with the idea of creating a common interface layer to the databases separate from the specifics of the underlying implementations. Tim Bunce took the lead and began specifying what would become the DBI module in 1994 upon the release of perl5 which eliminated the need for bespoke compilation in favor of dynamic, invocation time loading of libraries (modules) [2]. As of 2010 the Perl community maintains DBI as a CPAN module in accordance with the open source model. DBD (DataBase Driver) modules serve as plug-ins to DBI, allowing programmers to use near-database-independent SQL code in their applications. Programmers can also use the DBI and DBD modules indirectly using one of the object-relational mappers available for Perl, such as DBIx::Class, for more database-independent code with no need to write SQL.

Features

The DBI and DBD Perl packages allow Perl programmers to access many database environments in a standard way. The system implements each supported database environment as a DBD driver, in much the same way that hardware devices from multiple vendors can operate with different CPU platforms. Prospective DBD users can download DBD implementations from the Internet. DBD implementations exist for proprietary products such as IBM DB2, Microsoft SQL Server, Oracle and for free-software databases such as SQLite, PostgreSQL, Firebird and MySQL.

Similar projects

PHP 5 has a similar interface called PHP Data Objects (PDO).[3] Java's Java Database Connectivity (JDBC) is also similar.

References

  1. ^ https://blog.timbunce.org/2010/07/08/reflections-on-perl-and-dbi-from-an-early-contributor/
  2. ^ [1]
  3. ^ http://www.php.net/manual/en/intro.pdo.php

External links

  • Official website
  • DBI module documentation on MetaCPAN
  • DBD drivers on MetaCPAN


Retrieved from "https://en.wikipedia.org/w/index.php?title=Perl_DBI&oldid=855541990"
This content was retrieved from Wikipedia : http://en.wikipedia.org/wiki/Perl_DBI
This page is based on the copyrighted Wikipedia article "Perl DBI"; it is used under the Creative Commons Attribution-ShareAlike 3.0 Unported License (CC-BY-SA). You may redistribute it, verbatim or modified, providing that you comply with the terms of the CC-BY-SA