| The DBI is the standard database interface for the Perl programming language. The DBI is databaseindependent, which means that it can work with just about any database, such as Oracle, Sybase, Informix, Access, MySQL, etc.
While we assume that readers of this book have some experience with Perl, we don't assume much familiarity with databases themselves. The book starts out slowly, describing different types of databases and introducing the reader to common terminology.
This book is not solely about the DBI - it also concerns the more general subject of storing data in and retrieving data from databases of various forms. As such, this book is split into two related, but standalone, parts. The first part covers techniques for storing and retrieving data without the DBI, and the second, much larger part, covers the use of the DBI and related technologies.
Throughout the book, we assume that you have a basic grounding in programming with Perl and can put together simple scripts without instruction. If you don't have this level of Perl awareness, we suggest that you read some of the Perl books listed in Section P.1.
Once you're ready to read this book, there are some shortcuts that you can take depending on what you're most interested in reading about. If you are interested solely in the DBI, you can skip Chapter 2 without too much of a problem. On the other hand, if you're a wizard with SQL, then you should probably skip Chapter 3 to avoid the pain of us glossing over many fine details. Chapter 7 is a comparison between the DBI and ODBC and is mainly of interest to database geeks, design aficionados, and those people who have Win32::ODBC applications and are desperately trying to port them to DBI.
The subject of databases is a large and complex one, spanning many different concepts of structure, form, and expected use. There are also a multitude of different ways to access and manipulate the data stored within these databases.
This book describes and explains an interface called the Perl Database Interface, or DBI, which provides a unified interface for accessing data stored within many of these diverse database systems. The DBI allows you to write Perl code that accesses data without needing to worry about database- or platform-specific issues or proprietary interfaces.
We also take a look at non-DBI ways of storing, retrieving, and manipulating data with Perl, as there are occasions when the use of a database might be considered overkill but some form of structured data storage is required.
To begin, we shall discuss some of the more common uses of database systems in business today and the place that Perl and DBI takes within these frameworks. |