One of the greatest strengths of the Perl programming language is its ability to manipulate large amounts of data. Database programming is therefore a natural fit for Perl, not only for business applications but also for CGI-based web and intranet applications.The primary interface for database programming in Perl is DBI. DBI is a database-independent package that provides a consistent set of routines regardless of what database product you use--Oracle, Sybase, Ingres, Informix, you name it. The design of DBI is to separate the actual database drivers (DBDs) from the programmer's API, so any DBI program can work with any database, or even with multiple databases by different vendors simultaneously."Programming the Perl DBI" is coauthored by Alligator Descartes, one of the most active members of the DBI community, and by Tim Bunce, the inventor of DBI. For the uninitiated, the book explains the architecture of DBI and shows you how to write DBI-based programs. For the experienced DBI dabbler, this book reveals DBI's nuances and the peculiarities of each individual DBD.The book An introduction to DBI and its design How to construct queries and bind parameters Working with database, driver, and statement handles Debugging techniques Coverage of each existing DBD A complete reference to DBIThis is the definitive book for database programming in Perl.
For my web sites, I use a few basic elements: a Linux server to start; a MySQL or MariaDB database; for the user interface, besides Apache, I used previously HTML and CGI, but now Restructured Text with Sphinx for building; and I still use custom Perl programs for get data from the database for Sphinx and Apache to serve to users. To connect to the MySQL or MariaDB, the best module is Perl DBI.
Bunce's book is the best book at learning and understanding how to use Perl DBI to fetch data. He explains it well and gives straightforward examples to make it easy for you to use. This is one of five computer books I still keep in printed format -- the rest I recycled and now use the e-book versions. After many years, I still occasionally refer to this book.
Covering everything from database fundamentals to efficient query strategies and even ODBC, this book is an excellent primer to using the Perl DBI. My first edition copy is over seven years out-of-date now, but having just flipped through it again, I can see many of the topics covered are still relevant to the current version of DBI. If you're interested in combining Perl programming with database use, this book is an excellent place to start.