In
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, hardware and softw ...
, the Perl DBI (Perl Database Interface) offers a standardized way for
programmers using the
Perl
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Though Perl is not officially an acronym, there are various backronyms in use, including "Practical Extraction and Reporting Language".
Perl was developed ...
programming language
A programming language is a system of notation for writing computer programs.
Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
to embed
database
In computing, a database is an organized collection of data or a type of data store based on the use of a database management system (DBMS), the software that interacts with end users, applications, and the database itself to capture and a ...
communication within their programs. The latest DBI module for Perl from CPAN can run on a range of
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
s.
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 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). the Perl community maintains DBI as a
CPAN
The Comprehensive Perl Archive Network (CPAN) is a software repository of over 220,000 software modules and accompanying documentation for 45,500 distributions, written in the Perl programming language by over 14,500 contributors. ''CPAN'' can de ...
module in accordance with the
open-source model
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
. 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
Microsoft SQL Server is a proprietary relational database management system developed by Microsoft using Structured Query Language (SQL, often pronounced "sequel"). As a database server, it is a software product with the primary function of ...
,
Oracle
An oracle is a person or thing considered to provide insight, wise counsel or prophetic predictions, most notably including precognition of the future, inspired by deities. If done through occultic means, it is a form of divination.
Descript ...
and for
free-software databases such as
SQLite,
PostgreSQL
PostgreSQL ( ) also known as Postgres, is a free and open-source software, free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance. PostgreSQL features transaction processing, transactions ...
,
Firebird and
MySQL
MySQL () is an Open-source software, open-source relational database management system (RDBMS). Its name is a combination of "My", the name of co-founder Michael Widenius's daughter My, and "SQL", the acronym for Structured Query Language. A rel ...
.
Similar projects
PHP 5 has a similar interface called PHP Data Objects (PDO).
Java's
Java Database Connectivity
Java Database Connectivity (JDBC) is an application programming interface (API) for the Java programming language which defines how a client may access a database. It is a Java-based data access technology used for Java database connectivity. It is ...
(JDBC) is also similar.
References
External links
*
DBI module documentationon MetaCPAN
DBD driverson MetaCPAN
Perl modules
{{free-software-stub