diff --git a/Changes b/Changes index 0b318a1d..734f781b 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ 1.645 - 2024-08-25 TBD * Move developer tests to xt/ + * Make Changes match CPAN::Changes::Spec and rgen DBI::Changes from that 1.644 - 2024-08-23, Tim Bunce diff --git a/doc/DBI::FAQ.3 b/doc/DBI::FAQ.3 deleted file mode 100644 index 8fe908e9..00000000 --- a/doc/DBI::FAQ.3 +++ /dev/null @@ -1,1003 +0,0 @@ -.\" -*- mode: troff; coding: utf-8 -*- -.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. -.ie n \{\ -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is >0, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{\ -. if \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{\ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" -.\" Required to disable full justification in groff 1.23.0. -.if n .ds AD l -.\" ======================================================================== -.\" -.IX Title "DBI::FAQ 3" -.TH DBI::FAQ 3 2024-08-13 "perl v5.40.0" "User Contributed Perl Documentation" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH NAME -DBI::FAQ \-\- The Frequently Asked Questions for the Perl5 Database Interface -.SH SYNOPSIS -.IX Header "SYNOPSIS" -.Vb 1 -\& perldoc DBI::FAQ -.Ve -.SH VERSION -.IX Header "VERSION" -This document is currently at version \fI0.38\fR, as of \fIFebruary 8th, 2000\fR. -.PP -That\*(Aqs \fBvery\fR old. A newer FAQ can be found at -.PP -Neither this document nor that web site are actively maintained. -Volunteers are welcome. -.SH DESCRIPTION -.IX Header "DESCRIPTION" -This document serves to answer the most frequently asked questions on both -the DBI Mailing Lists and personally to members of the DBI development team. -.SH "Basic Information & Information Sources" -.IX Header "Basic Information & Information Sources" -.SS "1.1 What is DBI, DBperl, Oraperl and *perl?" -.IX Subsection "1.1 What is DBI, DBperl, Oraperl and *perl?" -To quote Tim Bunce, the architect and author of DBI: -.PP -.Vb 4 -\& DBI is a database access Application Programming Interface (API) -\& for the Perl Language. The DBI API Specification defines a set -\& of functions, variables and conventions that provide a consistent -\& database interface independent of the actual database being used. -.Ve -.PP -In simple language, the DBI interface allows users to access multiple database -types transparently. So, if you connecting to an Oracle, Informix, mSQL, Sybase -or whatever database, you don\*(Aqt need to know the underlying mechanics of the -3GL layer. The API defined by DBI will work on \fIall\fR these database types. -.PP -A similar benefit is gained by the ability to connect to two \fIdifferent\fR -databases of different vendor within the one perl script, \fIie\fR, I want -to read data from an Oracle database and insert it back into an Informix -database all within one program. The DBI layer allows you to do this simply -and powerfully. -.PP -\&\fIDBperl\fR is the old name for the interface specification. It\*(Aqs usually -now used to denote perl\fI4\fR modules on database interfacing, such as, -\&\fIoraperl\fR, \fIisqlperl\fR, \fIingperl\fR and so on. These interfaces -didn\*(Aqt have a standard API and are generally \fInot\fR supported. -.PP -Here\*(Aqs a list of DBperl modules, their corresponding DBI counterparts and -support information. \fIPlease note\fR, the author\*(Aqs listed here generally -\&\fIdo not\fR maintain the DBI module for the same database. These email -addresses are unverified and should only be used for queries concerning the -perl4 modules listed below. DBI driver queries should be directed to the -\&\fIdbi\-users\fR mailing list. -.PP -.Vb 10 -\& Module Name Database Required Author DBI -\& \-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\- \-\-\- -\& Sybperl Sybase Michael Peppler DBD::Sybase -\& -\& Oraperl Oracle 6 & 7 Kevin Stock DBD::Oracle -\& -\& Ingperl Ingres Tim Bunce & DBD::Ingres -\& Ted Lemon -\& -\& Interperl Interbase Buzz Moschetti DBD::Interbase -\& -\& Uniperl Unify 5.0 Rick Wargo None -\& -\& Pgperl Postgres Igor Metz DBD::Pg -\& -\& Btreeperl NDBM John Conover SDBM? -\& -\& Ctreeperl C\-Tree John Conover None -\& -\& Cisamperl Informix C\-ISAM Mathias Koerber None -\& -\& Duaperl X.500 Directory Eric Douglas None -\& User Agent -.Ve -.PP -However, some DBI modules have DBperl emulation layers, so, \fIDBD::Oracle\fR -comes with an Oraperl emulation layer, which allows you to run legacy oraperl -scripts without modification. The emulation layer translates the oraperl API -calls into DBI calls and executes them through the DBI switch. -.PP -Here\*(Aqs a table of emulation layer information: -.PP -.Vb 8 -\& Module Emulation Layer Status -\& \-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\- -\& DBD::Oracle Oraperl Complete -\& DBD::Informix Isqlperl Under development -\& DBD::Ingres Ingperl Complete? -\& DBD::Sybase Sybperl Working? ( Needs verification ) -\& DBD::mSQL Msqlperl Experimentally released with -\& DBD::mSQL\-0.61 -.Ve -.PP -The \fIMsqlperl\fR emulation is a special case. \fIMsqlperl\fR is a perl5 driver -for \fImSQL\fR databases, but does not conform to the DBI Specification. It\*(Aqs -use is being deprecated in favour of \fIDBD::mSQL\fR. \fIMsqlperl\fR may be downloaded -from CPAN \fIvia\fR: -.PP -.Vb 1 -\& http://www.perl.com/cgi\-bin/cpan_mod?module=Msqlperl -.Ve -.SS "1.2. Where can I get it from?" -.IX Subsection "1.2. Where can I get it from?" -The Comprehensive Perl Archive Network -resources should be used for retrieving up\-to\-date versions of the DBI -and drivers. CPAN may be accessed \fIvia\fR Tom Christiansen\*(Aqs splendid -\&\fICPAN multiplexer\fR program located at: -.PP -.Vb 1 -\& http://www.perl.com/CPAN/ -.Ve -.PP -For more specific version information and exact URLs of drivers, please see -the DBI drivers list and the DBI module pages which can be found on: -.PP -.Vb 1 -\& http://dbi.perl.org/ -.Ve -.PP -This list is automatically generated on a nightly basis from CPAN and should -be up\-to\-date. -.SS "1.3. Where can I get more information?" -.IX Subsection "1.3. Where can I get more information?" -There are a few information sources on DBI. -.IP "\fI""Programming the Perl DBI""\fR" 4 -.IX Item """Programming the Perl DBI""" -"Programming the Perl DBI" is the \fIofficial\fR book on the DBI written by -Alligator Descartes and Tim Bunce and published by O\*(AqReilly & Associates. -The book was released on February 9th, 2000. -.Sp -The table of contents is: -.Sp -.Vb 10 -\& Preface -\& 1. Introduction -\& From Mainframes to Workstations -\& Perl -\& DBI in the Real World -\& A Historical Interlude and Standing Stones -\& 2. Basic Non\-DBI Databases -\& Storage Managers and Layers -\& Query Languages and Data Functions -\& Standing Stones and the Sample Database -\& Flat\-File Databases -\& Putting Complex Data into Flat Files -\& Concurrent Database Access and Locking -\& DBM Files and the Berkeley Database Manager -\& The MLDBM Module -\& Summary -\& 3. SQL and Relational Databases -\& The Relational Database Methodology -\& Datatypes and NULL Values -\& Querying Data -\& Modifying Data Within Tables -\& Creating and Destroying Tables -\& 4. Programming with the DBI -\& DBI Architecture -\& Handles -\& Data Source Names -\& Connection and Disconnection -\& Error Handling -\& Utility Methods and Functions -\& 5. Interacting with the Database -\& Issuing Simple Queries -\& Executing Non\-SELECT Statements -\& Binding Parameters to Statements -\& Binding Output Columns -\& do() Versus prepare() -\& Atomic and Batch Fetching -\& 6. Advanced DBI -\& Handle Attributes and Metadata -\& Handling LONG/LOB Data -\& Transactions, Locking, and Isolation -\& 7. ODBC and the DBI -\& ODBC \-\- Embraced and Extended -\& DBI \-\- Thrashed and Mutated -\& The Nuts and Bolts of ODBC -\& ODBC from Perl -\& The Marriage of DBI and ODBC -\& Questions and Choices -\& Moving Between Win32::ODBC and the DBI -\& And What About ADO? -\& 8. DBI Shell and Database Proxying -\& dbish \-\- The DBI Shell -\& Database Proxying -\& A. DBI Specification -\& B. Driver and Database Characteristics -\& C. ASLaN Sacred Site Charter -\& Index -.Ve -.Sp -The book should be available from all good bookshops and can be ordered online -either via O\*(AqReilly & Associates -.Sp -.Vb 1 -\& http://www.oreilly.com/catalog/perldbi -.Ve -.Sp -or Amazon -.Sp -.Vb 1 -\& http://www.amazon.com/exec/obidos/ASIN/1565926994/dbi -.Ve -.IP "\fIPOD documentation\fR" 4 -.IX Item "POD documentation" -\&\fIPOD\fRs are chunks of documentation usually embedded within perl programs -that document the code \`\`\fIin place\fR\*(Aq\*(Aq, providing a useful resource for -programmers and users of modules. POD for DBI and drivers is beginning to -become more commonplace, and documentation for these modules can be read -with the \f(CW\*(C`perldoc\*(C'\fR program included with Perl. -.RS 4 -.IP "The DBI Specification" 4 -.IX Item "The DBI Specification" -The POD for the DBI Specification can be read with the: -.Sp -.Vb 1 -\& perldoc DBI -.Ve -.Sp -command. The Specification also forms Appendix A of "Programming the Perl -DBI". -.IP Oraperl 4 -.IX Item "Oraperl" -Users of the Oraperl emulation layer bundled with \fIDBD::Oracle\fR, may read -up on how to program with the Oraperl interface by typing: -.Sp -.Vb 1 -\& perldoc Oraperl -.Ve -.Sp -This will produce an updated copy of the original oraperl man page written by -Kevin Stock for perl4. The oraperl API is fully listed and described there. -.IP Drivers 4 -.IX Item "Drivers" -Users of the DBD modules may read about some of the private functions -and quirks of that driver by typing: -.Sp -.Vb 1 -\& perldoc -.Ve -.Sp -For example, the \fIDBD::mSQL\fR driver is bundled with driver\-specific -documentation that can be accessed by typing -.Sp -.Vb 1 -\& perldoc DBD::mSQL -.Ve -.IP "Frequently Asked Questions" 4 -.IX Item "Frequently Asked Questions" -This document, the \fIFrequently Asked Questions\fR is also available as POD -documentation! You can read this on your own system by typing: -.Sp -.Vb 1 -\& perldoc DBI::FAQ -.Ve -.Sp -This may be more convenient to persons not permanently, or conveniently, -connected to the Internet. The \fIDBI::FAQ\fR module should be downloaded and -installed for the more up\-to\-date version. -.Sp -The version of \fIDBI::FAQ\fR shipped with the \f(CW\*(C`DBI\*(C'\fR module may be slightly out -of date. -.IP "POD in general" 4 -.IX Item "POD in general" -Information on writing POD, and on the philosophy of POD in general, can be -read by typing: -.Sp -.Vb 1 -\& perldoc perlpod -.Ve -.Sp -Users with the Tk module installed may be interested to learn there is a -Tk\-based POD reader available called \f(CW\*(C`tkpod\*(C'\fR, which formats POD in a convenient -and readable way. This is available \fIvia\fR CPAN as the module called -\&\fITk::POD\fR and is highly recommended. -.RE -.RS 4 -.RE -.IP "\fIDriver and Database Characteristics\fR" 4 -.IX Item "Driver and Database Characteristics" -The driver summaries that were produced for Appendix B of "Programming the -Perl DBI" are available online at: -.Sp -.Vb 1 -\& http://dbi.perl.org/ -.Ve -.Sp -in the driver information table. These summaries contain standardised -information on each driver and database which should aid you in selecting -a database to use. It will also inform you quickly of any issues within -drivers or whether a driver is not fully compliant with the DBI Specification. -.IP "\fIRambles, Tidbits and Observations\fR" 4 -.IX Item "Rambles, Tidbits and Observations" -.Vb 1 -\& http://dbi.perl.org/tidbits -.Ve -.Sp -There are a series of occasional rambles from various people on the -DBI mailing lists who, in an attempt to clear up a simple point, end up -drafting fairly comprehensive documents. These are quite often varying in -quality, but do provide some insights into the workings of the interfaces. -.IP \fIArticles\fR 4 -.IX Item "Articles" -A list of articles discussing the DBI can be found on the DBI WWW page at: -.Sp -.Vb 1 -\& http://dbi.perl.org/ -.Ve -.Sp -These articles are of varying quality and age, from the original Perl Journal -article written by Alligator and Tim, to more recent debacles published online -from about.com. -.IP "\fIREADME files\fR" 4 -.IX Item "README files" -The \fIREADME\fR files included with each driver occasionally contains -some useful information ( no, really! ) that may be pertinent to the user. -Please read them. It makes our worthless existences more bearable. These -can all be read from the main DBI WWW page at: -.Sp -.Vb 1 -\& http://dbi.perl.org/ -.Ve -.IP "\fIMailing Lists\fR" 4 -.IX Item "Mailing Lists" -There are three mailing lists for DBI: -.Sp -.Vb 3 -\& dbi\-announce@perl.org \-\- for announcements, very low traffic -\& dbi\-users@perl.org \-\- general user support -\& dbi\-dev@perl.org \-\- for driver developers (no user support) -.Ve -.Sp -For information on how to subscribe, set digest mode etc, and unsubscribe, -send an email message (the content will be ignored) to: -.Sp -.Vb 3 -\& dbi\-announce\-help@perl.org -\& dbi\-users\-help@perl.org -\& dbi\-dev\-help@perl.org -.Ve -.IP "\fIMailing List Archives\fR" 4 -.IX Item "Mailing List Archives" -.RS 4 -.PD 0 -.IP "\fIUS Mailing List Archives\fR" 4 -.IX Item "US Mailing List Archives" -.PD -.Vb 1 -\& http://outside.organic.com/mail\-archives/dbi\-users/ -.Ve -.Sp -Searchable hypermail archives of the three mailing lists, and some of the -much older traffic have been set up for users to browse. -.IP "\fIEuropean Mailing List Archives\fR" 4 -.IX Item "European Mailing List Archives" -.Vb 1 -\& http://www.rosat.mpe\-garching.mpg.de/mailing\-lists/PerlDB\-Interest -.Ve -.Sp -As per the US archive above. -.RE -.RS 4 -.RE -.SH "Compilation Problems" -.IX Header "Compilation Problems" -.SS "2.1. Compilation problems or ""It fails the test!""" -.IX Subsection "2.1. Compilation problems or ""It fails the test!""" -First off, consult the README for that driver in case there is useful -information about the problem. It may be a known problem for your given -architecture and operating system or database. You can check the README -files for each driver in advance online at: -.PP -.Vb 1 -\& http://dbi.perl.org/ -.Ve -.PP -If it\*(Aqs a known problem, you\*(Aqll probably have to wait till it gets fixed. If -you\*(Aqre \fIreally\fR needing it fixed, try the following: -.IP "\fIAttempt to fix it yourself\fR" 4 -.IX Item "Attempt to fix it yourself" -This technique is generally \fInot\fR recommended to the faint\-hearted. -If you do think you have managed to fix it, then, send a patch file -( context diff ) to the author with an explanation of: -.RS 4 -.IP \(bu 4 -What the problem was, and test cases, if possible. -.IP \(bu 4 -What you needed to do to fix it. Please make sure you mention everything. -.IP \(bu 4 -Platform information, database version, perl version, module version and -DBI version. -.RE -.RS 4 -.RE -.IP "\fIEmail the author\fR Do \fINOT\fR whinge!" 4 -.IX Item "Email the author Do NOT whinge!" -Please email the address listed in the WWW pages for whichever driver you -are having problems with. Do \fInot\fR directly email the author at a -known address unless it corresponds with the one listed. -.Sp -We tend to have real jobs to do, and we do read the mailing lists for -problems. Besides, we may not have access to <\fIinsert your -favourite brain\-damaged platform here\fR> and couldn\*(Aqt be of any -assistance anyway! Apologies for sounding harsh, but that\*(Aqs the way of it! -.Sp -However, you might catch one of these creative genii at 3am when we\*(Aqre -doing this sort of stuff anyway, and get a patch within 5 minutes. The -atmosphere in the DBI circle is that we \fIdo\fR appreciate the users\*(Aq -problems, since we work in similar environments. -.Sp -If you are planning to email the author, please furnish as much information -as possible, \fIie\fR: -.RS 4 -.IP \(bu 4 -\&\fIALL\fR the information asked for in the README file in -the problematic module. And we mean \fIALL\fR of it. We don\*(Aqt -put lines like that in documentation for the good of our health, or -to meet obscure README file standards of length. -.IP \(bu 4 -If you have a core dump, try the \fIDevel::CoreStack\fR module for -generating a stack trace from the core dump. Send us that too. -\&\fIDevel::CoreStack\fR can be found on CPAN at: -.Sp -.Vb 1 -\& http://www.perl.com/cgi\-bin/cpan_mod?module=Devel::CoreStack -.Ve -.IP \(bu 4 -Module versions, perl version, test cases, operating system versions -and \fIany other pertinent information\fR. -.RE -.RS 4 -.Sp -Remember, the more information you send us, the quicker we can track -problems down. If you send us no useful information, expect nothing back. -.Sp -Finally, please be aware that some authors, including Tim Bunce, specifically -request that you do \fInot\fR mail them directly. Please respect their wishes and -use the email addresses listed in the appropriate module \f(CW\*(C`README\*(C'\fR file. -.RE -.IP "\fIEmail the dbi\-users Mailing List\fR" 4 -.IX Item "Email the dbi-users Mailing List" -It\*(Aqs usually a fairly intelligent idea to \fIcc\fR the mailing list -anyway with problems. The authors all read the lists, so you lose nothing -by mailing there. -.SH "Platform and Driver Issues" -.IX Header "Platform and Driver Issues" -.SS "3.1 What\*(Aqs the difference between ODBC and DBI?" -.IX Subsection "3.1 What's the difference between ODBC and DBI?" -In terms of architecture \- not much: Both define programming -interfaces. Both allow multiple drivers to be loaded to do the -actual work. -.PP -In terms of ease of use \- much: The DBI is a \*(Aqhigh level\*(Aq interface -that, like Perl itself, strives to make the simple things easy while -still making the hard things possible. The ODBC is a \*(Aqlow level\*(Aq -interface. All nuts\-bolts\-knobs\-and\-dials. -.PP -Now there\*(Aqs an ODBC driver for the DBI (DBD::ODBC) the "What\*(Aqs the -difference" question is more usefully rephrased as: -.PP -Chapter 7 of "Programming the Perl DBI" covers this topic in far more -detail and should be consulted. -.SS "3.2 What\*(Aqs the difference between Win32::ODBC and DBD::ODBC?" -.IX Subsection "3.2 What's the difference between Win32::ODBC and DBD::ODBC?" -The DBI, and thus DBD::ODBC, has a different philosophy from the -Win32::ODBC module: -.PP -The Win32::ODBC module is a \*(Aqthin\*(Aq layer over the low\-level ODBC API. -The DBI defines a simpler \*(Aqhigher level\*(Aq interface. -.PP -The Win32::ODBC module gives you access to more of the ODBC API. -The DBI and DBD::ODBC give you access to only the essentials. -(But, unlike Win32::ODBC, the DBI and DBD::ODBC do support parameter -binding and multiple prepared statements which reduces the load on -the database server and can dramatically increase performance.) -.PP -The Win32::ODBC module only works on Win32 systems. -The DBI and DBD::ODBC are very portable and work on Win32 and Unix. -.PP -The DBI and DBD::ODBC modules are supplied as a standard part of the -Perl 5.004 binary distribution for Win32 (they don\*(Aqt work with the -older, non\-standard, ActiveState port). -.PP -Scripts written with the DBI and DBD::ODBC are faster than Win32::ODBC -on Win32 and are trivially portable to other supported database types. -.PP -The DBI offers optional automatic printing or \fBdie()\fRing on errors which -makes applications simpler and more robust. -.PP -The current DBD::ODBC driver version 0.16 is new and not yet fully stable. -A new release is due soon [relative to the date of the next TPJ issue :\-] -and will be much improved and offer more ODBC functionality. -.PP -To summarise: The Win32::ODBC module is your best choice if you need -access to more of the ODBC API than the DBI gives you. Otherwise, the -DBI and DBD::ODBC combination may be your best bet. -.PP -Chapter 7 of "Programming the Perl DBI" covers this topic in far more -detail and should be consulted. -.SS "3.3 Is DBI supported under Windows 95 / NT platforms?" -.IX Subsection "3.3 Is DBI supported under Windows 95 / NT platforms?" -Finally, yes! Jeff Urlwin has been working diligently on building -\&\fIDBI\fR and \fIDBD::ODBC\fR under these platforms, and, with the -advent of a stabler perl and a port of \fIMakeMaker\fR, the project has -come on by great leaps and bounds. -.PP -The \fIDBI\fR and \fIDBD::Oracle\fR Win32 ports are now a standard part of DBI, -so, downloading \fIDBI\fR of version higher than \fI0.81\fR should work fine as -should using the most recent \fIDBD::Oracle\fR version. -.SS "3.4 Can I access Microsoft Access or SQL\-Server databases with DBI?" -.IX Subsection "3.4 Can I access Microsoft Access or SQL-Server databases with DBI?" -Yes, use the \fIDBD::ODBC\fR driver. -.SS "3.5 Is there a DBD for <\fIinsert favourite database here\fP>?" -.IX Subsection "3.5 Is there a DBD for ?" -First check if a driver is available on CPAN by searching for the name of the -database (including common abbreviations and aliases). -.PP -Here\*(Aqs a general query that\*(Aqll match all distributions: -.PP -.Vb 1 -\& http://search.cpan.org/search?query=DBD&mode=dist -.Ve -.PP -If you can\*(Aqt find a driver that way, you could check if the database supports -ODBC drivers. If so then you could probably use the DBD::ODBC driver: -.PP -.Vb 1 -\& http://search.cpan.org/dist/DBD\-ODBC/ -.Ve -.PP -If not, then try asking on the dbi\-users mailing list. -.SS "3.6 What\*(Aqs DBM? And why should I use DBI instead?" -.IX Subsection "3.6 What's DBM? And why should I use DBI instead?" -Extracted from \`\`\fIDBI \- The Database Interface for Perl 5\fR\*(Aq\*(Aq: -.PP -.Vb 3 -\& \`\`UNIX was originally blessed with simple file\-based \`\`databases\*(Aq\*(Aq, namely -\& the dbm system. dbm lets you store data in files, and retrieve -\& that data quickly. However, it also has serious drawbacks. -\& -\& File Locking -\& -\& The dbm systems did not allow particularly robust file locking -\& capabilities, nor any capability for correcting problems arising through -\& simultaneous writes [ to the database ]. -\& -\& Arbitrary Data Structures -\& -\& The dbm systems only allows a single fixed data structure: -\& key\-value pairs. That value could be a complex object, such as a -\& [ C ] struct, but the key had to be unique. This was a large -\& limitation on the usefulness of dbm systems. -\& -\& However, dbm systems still provide a useful function for users with -\& simple datasets and limited resources, since they are fast, robust and -\& extremely well\-tested. Perl modules to access dbm systems have now -\& been integrated into the core Perl distribution via the -\& AnyDBM_File module.\*(Aq\*(Aq -.Ve -.PP -To sum up, DBM is a perfectly satisfactory solution for essentially read\-only -databases, or small and simple datasets. However, for more -scalable dataset handling, not to mention robust transactional locking, -users are recommended to use a more powerful database engine \fIvia\fR \fIDBI\fR. -.PP -Chapter 2 of "Programming the Perl DBI" discusses DBM files in detail. -.SS "3.7 What database do you recommend me using?" -.IX Subsection "3.7 What database do you recommend me using?" -This is a particularly thorny area in which an objective answer is difficult -to come by, since each dataset, proposed usage and system configuration -differs from person to person. -.PP -From the current author\*(Aqs point of view, if the dataset is relatively -small, being tables of less than 1 million rows, and less than 1000 tables -in a given database, then \fImSQL\fR is a perfectly acceptable solution -to your problem. This database is extremely cheap, is wonderfully robust -and has excellent support. More information is available on the Hughes -Technology WWW site at: -.PP -.Vb 1 -\& http://www.hughes.com.au -.Ve -.PP -You may also wish to look at MySQL which is a more powerful database engine -that has a similar feel to mSQL. -.PP -.Vb 1 -\& http://www.tcx.se -.Ve -.PP -If the dataset is larger than 1 million row tables or 1000 tables, or if you -have either more money, or larger machines, I would recommend \fIOracle RDBMS\fR. -Oracle\*(Aqs WWW site is an excellent source of more information. -.PP -.Vb 1 -\& http://www.oracle.com -.Ve -.PP -\&\fIInformix\fR is another high\-end RDBMS that is worth considering. There are -several differences between Oracle and Informix which are too complex for -this document to detail. Information on Informix can be found on their -WWW site at: -.PP -.Vb 1 -\& http://www.informix.com -.Ve -.PP -In the case of WWW fronted applications, \fImSQL\fR may be a better option -due to slow connection times between a CGI script and the Oracle RDBMS and -also the amount of resource each Oracle connection will consume. \fImSQL\fR -is lighter resource\-wise and faster. -.PP -These views are not necessarily representative of anyone else\*(Aqs opinions, -and do not reflect any corporate sponsorship or views. They are provided -\&\fIas\-is\fR. -.SS "3.8 Is <\fIinsert feature here\fP> supported in DBI?" -.IX Subsection "3.8 Is supported in DBI?" -Given that we\*(Aqre making the assumption that the feature you have requested -is a non\-standard database\-specific feature, then the answer will be \fIno\fR. -.PP -DBI reflects a \fIgeneric\fR API that will work for most databases, and has -no database\-specific functionality. -.PP -However, driver authors may, if they so desire, include hooks to database\-specific -functionality through the \f(CWfunc()\fR method defined in the DBI API. -Script developers should note that use of functionality provided \fIvia\fR -the \f(CWfunc()\fR methods is very unlikely to be portable across databases. -.SH "Programming Questions" -.IX Header "Programming Questions" -.SS "4.1 Is DBI any use for CGI programming?" -.IX Subsection "4.1 Is DBI any use for CGI programming?" -In a word, yes! DBI is hugely useful for CGI programming! In fact, I would -tentatively say that CGI programming is one of two top uses for DBI. -.PP -DBI confers the ability to CGI programmers to power WWW\-fronted databases -to their users, which provides users with vast quantities of ordered -data to play with. DBI also provides the possibility that, if a site is -receiving far too much traffic than their database server can cope with, they -can upgrade the database server behind the scenes with no alterations to -the CGI scripts. -.SS "4.2 How do I get faster connection times with DBD::Oracle and CGI?" -.IX Subsection "4.2 How do I get faster connection times with DBD::Oracle and CGI?" -.Vb 1 -\& Contributed by John D. Groenveld -.Ve -.PP -The Apache \f(CW\*(C`httpd\*(C'\fR maintains a pool of \f(CW\*(C`httpd\*(C'\fR children to service client -requests. -.PP -Using the Apache \fImod_perl\fR module by \fIDoug MacEachern\fR, the perl -interpreter is embedded with the \f(CW\*(C`httpd\*(C'\fR children. The CGI, DBI, and your -other favorite modules can be loaded at the startup of each child. These -modules will not be reloaded unless changed on disk. -.PP -For more information on Apache, see the Apache Project\*(Aqs WWW site: -.PP -.Vb 1 -\& http://www.apache.org -.Ve -.PP -The \fImod_perl\fR module can be downloaded from CPAN \fIvia\fR: -.PP -.Vb 1 -\& http://www.perl.com/cgi\-bin/cpan_mod?module=Apache -.Ve -.SS "4.3 How do I get persistent connections with DBI and CGI?" -.IX Subsection "4.3 How do I get persistent connections with DBI and CGI?" -.Vb 1 -\& Contributed by John D. Groenveld -.Ve -.PP -Using Edmund Mergl\*(Aqs \fIApache::DBI\fR module, database logins are stored in a -hash with each of these \f(CW\*(C`httpd\*(C'\fR child. If your application is based on a -single database user, this connection can be started with each child. -Currently, database connections cannot be shared between \f(CW\*(C`httpd\*(C'\fR children. -.PP -\&\fIApache::DBI\fR can be downloaded from CPAN \fIvia\fR: -.PP -.Vb 1 -\& http://www.perl.com/cgi\-bin/cpan_mod?module=Apache::DBI -.Ve -.ie n .SS "4.4 \`\`When I run a perl script from the command line, it works, but, when I run it under the ""httpd"", it fails!\*(Aq\*(Aq Why?" -.el .SS "4.4 \`\`When I run a perl script from the command line, it works, but, when I run it under the \f(CWhttpd\fP, it fails!\*(Aq\*(Aq Why?" -.IX Subsection "4.4 ``When I run a perl script from the command line, it works, but, when I run it under the httpd, it fails!'' Why?" -Basically, a good chance this is occurring is due to the fact that the user -that you ran it from the command line as has a correctly configured set of -environment variables, in the case of \fIDBD::Oracle\fR, variables like -\&\f(CW\*(C`ORACLE_HOME\*(C'\fR, \f(CW\*(C`ORACLE_SID\*(C'\fR or \f(CW\*(C`TWO_TASK\*(C'\fR. -.PP -The \f(CW\*(C`httpd\*(C'\fR process usually runs under the user id of \f(CW\*(C`nobody\*(C'\fR, -which implies there is no configured environment. Any scripts attempting to -execute in this situation will correctly fail. -.PP -One way to solve this problem is to set the environment for your database in a -\&\f(CW\*(C`BEGIN { }\*(C'\fR block at the top of your script. Another technique is to configure -your WWW server to pass\-through certain environment variables to your CGI -scripts. -.PP -Similarly, you should check your \f(CW\*(C`httpd\*(C'\fR error logfile for any clues, -as well as the \`\`Idiot\*(Aqs Guide To Solving Perl / CGI Problems\*(Aq\*(Aq and -\&\`\`Perl CGI Programming FAQ\*(Aq\*(Aq for further information. It is -unlikely the problem is DBI\-related. -.PP -The \`\`Idiot\*(Aqs Guide To Solving Perl / CGI Problems\*(Aq\*(Aq can be located at: -.PP -.Vb 1 -\& http://www.perl.com/perl/faq/index.html -.Ve -.PP -as can the \`\`Perl CGI Programming FAQ\*(Aq\*(Aq. Read \fIBOTH\fR these documents -carefully! -.ie n .SS "4.5 How do I get the number of rows returned from a ""SELECT"" statement?" -.el .SS "4.5 How do I get the number of rows returned from a \f(CWSELECT\fP statement?" -.IX Subsection "4.5 How do I get the number of rows returned from a SELECT statement?" -Count them. Read the DBI docs for the \f(CWrows()\fR method. -.SH "Miscellaneous Questions" -.IX Header "Miscellaneous Questions" -.SS "5.1 Can I do multi\-threading with DBI?" -.IX Subsection "5.1 Can I do multi-threading with DBI?" -Perl version 5.005 and later can be built to support multi\-threading. -The DBI, as of version 1.02, does not yet support multi\-threading -so it would be unsafe to let more than one thread enter the DBI at -the same time. -.PP -It is expected that some future version of the DBI will at least be -thread\-safe (but not thread\-hot) by automatically blocking threads -entering the DBI while it\*(Aqs already in use. -.SS "5.2 How do I handle BLOB data with DBI?" -.IX Subsection "5.2 How do I handle BLOB data with DBI?" -Handling BLOB data with the DBI is very straight\-forward. BLOB columns are -specified in a SELECT statement as per normal columns. However, you also -need to specify a maximum BLOB size that the database handle can -fetch using the \f(CW\*(C`LongReadLen\*(C'\fR attribute. -.PP -For example: -.PP -.Vb 3 -\& ### $dbh is a connected database handle -\& $sth = $dbh\->prepare( "SELECT blob_column FROM blobby_table" ); -\& $sth\->execute; -.Ve -.PP -would fail. -.PP -.Vb 3 -\& ### $dbh is a connected database handle -\& ### Set the maximum BLOB size... -\& $dbh\->{LongReadLen} = 16384; ### 16Kb...Not much of a BLOB! -\& -\& $sth = $dbh\->prepare( "..." ); -.Ve -.PP -would succeed provided no column values were larger than the specified -value. -.PP -If the BLOB data is longer than the value of \f(CW\*(C`LongReadLen\*(C'\fR, then an -error will occur. However, the DBI provides an additional piece of -functionality that will automatically truncate the fetched BLOB to the -size of \f(CW\*(C`LongReadLen\*(C'\fR if it is longer. This does not cause an error to -occur, but may make your fetched BLOB data useless. -.PP -This behaviour is regulated by the \f(CW\*(C`LongTruncOk\*(C'\fR attribute which is -set to a false value by default ( thus making overlong BLOB fetches fail ). -.PP -.Vb 3 -\& ### Set BLOB handling such that it\*(Aqs 16Kb and can be truncated -\& $dbh\->{LongReadLen} = 16384; -\& $dbh\->{LongTruncOk} = 1; -.Ve -.PP -Truncation of BLOB data may not be a big deal in cases where the BLOB -contains run\-length encoded data, but data containing checksums at the end, -for example, a ZIP file, would be rendered useless. -.SS "5.3 How can I invoke stored procedures with DBI?" -.IX Subsection "5.3 How can I invoke stored procedures with DBI?" -The DBI does not define a database\-independent way of calling stored procedures. -.PP -However, most database that support them also provide a way to call -them from SQL statements \- and the DBI certainly supports that. -.PP -So, assuming that you have created a stored procedure within the target -database, \fIeg\fR, an Oracle database, you can use \f(CW$dbh\fR\->\f(CWdo()\fR to -immediately execute the procedure. For example, -.PP -.Vb 1 -\& $dbh\->do( "BEGIN someProcedure; END;" ); # Oracle\-specific -.Ve -.PP -You should also be able to \f(CW\*(C`prepare\*(C'\fR and \f(CW\*(C`execute\*(C'\fR, which is -the recommended way if you\*(Aqll be calling the procedure often. -.SS "5.4 How can I get return values from stored procedures with DBI?" -.IX Subsection "5.4 How can I get return values from stored procedures with DBI?" -.Vb 1 -\& Contributed by Jeff Urlwin -\& -\& $sth = $dbh\->prepare( "BEGIN foo(:1, :2, :3); END;" ); -\& $sth\->bind_param(1, $a); -\& $sth\->bind_param_inout(2, \e$path, 2000); -\& $sth\->bind_param_inout(3, \e$success, 2000); -\& $sth\->execute; -.Ve -.PP -Remember to perform error checking, though! ( Or use the \f(CW\*(C`RaiseError\*(C'\fR -attribute ). -.SS "5.5 How can I create or drop a database with DBI?" -.IX Subsection "5.5 How can I create or drop a database with DBI?" -Database creation and deletion are concepts that are entirely too abstract -to be adequately supported by DBI. For example, Oracle does not support the -concept of dropping a database at all! Also, in Oracle, the database -\&\fIserver\fR essentially \fIis\fR the database, whereas in mSQL, the -server process runs happily without any databases created in it. The -problem is too disparate to attack in a worthwhile way. -.PP -Some drivers, therefore, support database creation and deletion through -the private \f(CWfunc()\fR methods. You should check the documentation for -the drivers you are using to see if they support this mechanism. -.ie n .SS "5.6 How can I ""commit"" or ""rollback"" a statement with DBI?" -.el .SS "5.6 How can I \f(CWcommit\fP or \f(CWrollback\fP a statement with DBI?" -.IX Subsection "5.6 How can I commit or rollback a statement with DBI?" -See the \f(CWcommit()\fR and \f(CWrollback()\fR methods in the DBI Specification. -.PP -Chapter 6 of "Programming the Perl DBI" discusses transaction handling within -the context of DBI in more detail. -.ie n .SS "5.7 How are ""NULL"" values handled by DBI?" -.el .SS "5.7 How are \f(CWNULL\fP values handled by DBI?" -.IX Subsection "5.7 How are NULL values handled by DBI?" -\&\f(CW\*(C`NULL\*(C'\fR values in DBI are specified to be treated as the value \f(CW\*(C`undef\*(C'\fR. -\&\f(CW\*(C`NULL\*(C'\fRs can be inserted into databases as \f(CW\*(C`NULL\*(C'\fR, for example: -.PP -.Vb 1 -\& $rv = $dbh\->do( "INSERT INTO table VALUES( NULL )" ); -.Ve -.PP -but when queried back, the \f(CW\*(C`NULL\*(C'\fRs should be tested against \f(CW\*(C`undef\*(C'\fR. -This is standard across all drivers. -.ie n .SS "5.8 What are these func() methods all about?" -.el .SS "5.8 What are these \f(CWfunc()\fP methods all about?" -.IX Subsection "5.8 What are these func() methods all about?" -The \f(CWfunc()\fR method is defined within DBI as being an entry point -for database\-specific functionality, \fIeg\fR, the ability to create or -drop databases. Invoking these driver\-specific methods is simple, for example, -to invoke a \f(CW\*(C`createDatabase\*(C'\fR method that has one argument, we would -write: -.PP -.Vb 1 -\& $rv =$dbh\->func( \*(Aqargument\*(Aq, \*(AqcreateDatabase\*(Aq ); -.Ve -.PP -Software developers should note that the \f(CWfunc()\fR methods are -non\-portable between databases. -.SS "5.9 Is DBI Year 2000 Compliant?" -.IX Subsection "5.9 Is DBI Year 2000 Compliant?" -DBI has no knowledge of understanding of what dates are. Therefore, DBI -itself does not have a Year 2000 problem. Individual drivers may use date -handling code internally and therefore be potentially susceptible to the -Year 2000 problem, but this is unlikely. -.PP -You may also wish to read the \`\`Does Perl have a Year 2000 problem?\*(Aq\*(Aq section -of the Perl FAQ at: -.PP -.Vb 1 -\& http://www.perl.com/CPAN/doc/FAQs/FAQ/PerlFAQ.html -.Ve -.SH "Support and Training" -.IX Header "Support and Training" -The Perl5 Database Interface is \fIFREE\fR software. IT COMES WITHOUT WARRANTY -OF ANY KIND. See the DBI README for more details. -.PP -However, some organizations are providing either technical support or -training programs on DBI. The present author has no knowledge as -to the quality of these services. The links are included for reference -purposes only and should not be regarded as recommendations in any way. -\&\fICaveat emptor\fR. -.SS "Commercial Support" -.IX Subsection "Commercial Support" -.IP "The Perl Clinic" 4 -.IX Item "The Perl Clinic" -The Perl Clinic provides commercial support for \fIPerl\fR and Perl -related problems, including the \fIDBI\fR and its drivers. Support is -provided by the company with whom Tim Bunce, author of \fIDBI\fR and -\&\fIDBD::Oracle\fR, works and ActiveState. For more information on their -services, please see: -.Sp -.Vb 1 -\& http://www.perlclinic.com -.Ve -.SS Training -.IX Subsection "Training" -.IP "Westlake Solutions" 4 -.IX Item "Westlake Solutions" -A hands\-on class for experienced Perl CGI developers that teaches -how to write database\-connected CGI scripts using Perl and DBI.pm. This -course, along with four other courses on CGI scripting with Perl, is -taught in Washington, DC; Arlington, Virginia; and on\-site worldwide upon -request. -.Sp -See: -.Sp -.Vb 1 -\& http://www.westlake.com/training -.Ve -.Sp -for more details. -.SH "Other References" -.IX Header "Other References" -In this section, we present some miscellaneous WWW links that may be of -some interest to DBI users. These are not verified and may result in -unknown sites or missing documents. -.PP -.Vb 3 -\& http://www\-ccs.cs.umass.edu/db.html -\& http://www.odmg.org/odmg93/updates_dbarry.html -\& http://www.jcc.com/sql_stnd.html -.Ve -.SH AUTHOR -.IX Header "AUTHOR" -Alligator Descartes. -Portions are Copyright their original stated authors. -.SH COPYRIGHT -.IX Header "COPYRIGHT" -This document is Copyright (c)1994\-2000 Alligator Descartes, with portions -Copyright (c)1994\-2000 their original authors. This module is released under -the \*(AqArtistic\*(Aq license which you can find in the perl distribution. -.PP -This document is Copyright (c)1997\-2000 Alligator Descartes. All rights reserved. -Permission to distribute this document, in full or in part, via email, -Usenet, ftp archives or http is granted providing that no charges are involved, -reasonable attempt is made to use the most current version and all credits -and copyright notices are retained ( the \fIAUTHOR\fR and \fICOPYRIGHT\fR sections ). -Requests for other distribution rights, including incorporation into -commercial products, such as books, magazine articles or CD\-ROMs should be -made to Alligator Descartes. diff --git a/doc/DBI::FAQ.html b/doc/DBI::FAQ.html deleted file mode 100644 index 316bc840..00000000 --- a/doc/DBI::FAQ.html +++ /dev/null @@ -1,818 +0,0 @@ - - - - - - - - - - - - - - - -

NAME

- -

DBI::FAQ -- The Frequently Asked Questions for the Perl5 Database Interface

- - - - -
- -DBI Frequently Asked Questions v.0.38 - -
- -Last updated: February 8th, 2000 - -
-

- -

SYNOPSIS

- -
perldoc DBI::FAQ
- -

VERSION

- -

This document is currently at version 0.38, as of February 8th, 2000.

- -

That's very old. A newer FAQ can be found at http://faq.dbi-support.com/

- -

Neither this document nor that web site are actively maintained. Volunteers are welcome.

- -

DESCRIPTION

- -

This document serves to answer the most frequently asked questions on both the DBI Mailing Lists and personally to members of the DBI development team.

- -

Basic Information & Information Sources

- -

1.1 What is DBI, DBperl, Oraperl and *perl?

- -

To quote Tim Bunce, the architect and author of DBI:

- -
DBI is a database access Application Programming Interface (API)
-for the Perl Language. The DBI API Specification defines a set
-of functions, variables and conventions that provide a consistent
-database interface independent of the actual database being used.
- -

In simple language, the DBI interface allows users to access multiple database types transparently. So, if you connecting to an Oracle, Informix, mSQL, Sybase or whatever database, you don't need to know the underlying mechanics of the 3GL layer. The API defined by DBI will work on all these database types.

- -

A similar benefit is gained by the ability to connect to two different databases of different vendor within the one perl script, ie, I want to read data from an Oracle database and insert it back into an Informix database all within one program. The DBI layer allows you to do this simply and powerfully.

- - -Here's a diagram that demonstrates the principle: -

-

-[ DBI Architecture ] -
-

- -

DBperl is the old name for the interface specification. It's usually now used to denote perl4 modules on database interfacing, such as, oraperl, isqlperl, ingperl and so on. These interfaces didn't have a standard API and are generally not supported.

- -

Here's a list of DBperl modules, their corresponding DBI counterparts and support information. Please note, the author's listed here generally do not maintain the DBI module for the same database. These email addresses are unverified and should only be used for queries concerning the perl4 modules listed below. DBI driver queries should be directed to the dbi-users mailing list.

- -
Module Name Database Required   Author          DBI
------------ -----------------   ------          ---
-Sybperl     Sybase              Michael Peppler DBD::Sybase
-                                <mpeppler@itf.ch>
-Oraperl     Oracle 6 & 7        Kevin Stock     DBD::Oracle
-                                <dbi-users@perl.org>
-Ingperl     Ingres              Tim Bunce &     DBD::Ingres
-                                Ted Lemon
-                                <dbi-users@perl.org>
-Interperl   Interbase           Buzz Moschetti  DBD::Interbase
-                                <buzz@bear.com>
-Uniperl     Unify 5.0           Rick Wargo      None
-                                <rickers@coe.drexel.edu>
-Pgperl      Postgres            Igor Metz       DBD::Pg
-                                <metz@iam.unibe.ch>
-Btreeperl   NDBM                John Conover    SDBM?
-                                <john@johncon.com>
-Ctreeperl   C-Tree              John Conover    None
-                                <john@johncon.com>
-Cisamperl   Informix C-ISAM     Mathias Koerber None
-                                <mathias@unicorn.swi.com.sg>
-Duaperl     X.500 Directory     Eric Douglas    None
-            User Agent
- -

However, some DBI modules have DBperl emulation layers, so, DBD::Oracle comes with an Oraperl emulation layer, which allows you to run legacy oraperl scripts without modification. The emulation layer translates the oraperl API calls into DBI calls and executes them through the DBI switch.

- -

Here's a table of emulation layer information:

- -
Module                  Emulation Layer     Status
-------          ---------------     ------
-DBD::Oracle     Oraperl             Complete
-DBD::Informix   Isqlperl            Under development
-DBD::Ingres     Ingperl             Complete?
-DBD::Sybase     Sybperl             Working? ( Needs verification )
-DBD::mSQL       Msqlperl            Experimentally released with
-                                    DBD::mSQL-0.61
- -

The Msqlperl emulation is a special case. Msqlperl is a perl5 driver for mSQL databases, but does not conform to the DBI Specification. It's use is being deprecated in favour of DBD::mSQL. Msqlperl may be downloaded from CPAN via:

- -
http://www.perl.com/cgi-bin/cpan_mod?module=Msqlperl
- -

1.2. Where can I get it from?

- -

The Comprehensive Perl Archive Network resources should be used for retrieving up-to-date versions of the DBI and drivers. CPAN may be accessed via Tom Christiansen's splendid CPAN multiplexer program located at:

- -
http://www.perl.com/CPAN/
- -

For more specific version information and exact URLs of drivers, please see the DBI drivers list and the DBI module pages which can be found on:

- -
http://dbi.perl.org/
- -

This list is automatically generated on a nightly basis from CPAN and should be up-to-date.

- -

1.3. Where can I get more information?

- -

There are a few information sources on DBI.

- -
- -
"Programming the Perl DBI"
-
- -

"Programming the Perl DBI" is the official book on the DBI written by Alligator Descartes and Tim Bunce and published by O'Reilly & Associates. The book was released on February 9th, 2000.

- -

The table of contents is:

- -
Preface
-1. Introduction
-    From Mainframes to Workstations
-    Perl
-    DBI in the Real World
-    A Historical Interlude and Standing Stones
-2. Basic Non-DBI Databases
-    Storage Managers and Layers
-    Query Languages and Data Functions
-    Standing Stones and the Sample Database
-    Flat-File Databases
-    Putting Complex Data into Flat Files
-    Concurrent Database Access and Locking
-    DBM Files and the Berkeley Database Manager
-    The MLDBM Module
-    Summary
-3. SQL and Relational Databases
-    The Relational Database Methodology
-    Datatypes and NULL Values
-    Querying Data
-    Modifying Data Within Tables
-    Creating and Destroying Tables
-4. Programming with the DBI
-    DBI Architecture
-    Handles
-    Data Source Names
-    Connection and Disconnection
-    Error Handling
-    Utility Methods and Functions
-5. Interacting with the Database
-    Issuing Simple Queries
-    Executing Non-SELECT Statements
-    Binding Parameters to Statements
-    Binding Output Columns
-    do() Versus prepare()
-    Atomic and Batch Fetching
-6. Advanced DBI
-    Handle Attributes and Metadata
-    Handling LONG/LOB Data
-    Transactions, Locking, and Isolation
-7. ODBC and the DBI
-    ODBC -- Embraced and Extended
-    DBI -- Thrashed and Mutated
-    The Nuts and Bolts of ODBC
-    ODBC from Perl
-    The Marriage of DBI and ODBC
-    Questions and Choices
-    Moving Between Win32::ODBC and the DBI
-    And What About ADO?
-8. DBI Shell and Database Proxying
-    dbish -- The DBI Shell
-    Database Proxying
-A. DBI Specification
-B. Driver and Database Characteristics
-C. ASLaN Sacred Site Charter
-Index
- -

The book should be available from all good bookshops and can be ordered online either <I>via</I> O'Reilly & Associates

- -
http://www.oreilly.com/catalog/perldbi
- -

or Amazon

- -
http://www.amazon.com/exec/obidos/ASIN/1565926994/dbi
- -
-
POD documentation
-
- -

PODs are chunks of documentation usually embedded within perl programs that document the code ``in place'', providing a useful resource for programmers and users of modules. POD for DBI and drivers is beginning to become more commonplace, and documentation for these modules can be read with the perldoc program included with Perl.

- -
- -
The DBI Specification
-
- -

The POD for the DBI Specification can be read with the:

- -
perldoc DBI
- -

command. The Specification also forms Appendix A of "Programming the Perl DBI".

- -
-
Oraperl
-
- -

Users of the Oraperl emulation layer bundled with DBD::Oracle, may read up on how to program with the Oraperl interface by typing:

- -
perldoc Oraperl
- -

This will produce an updated copy of the original oraperl man page written by Kevin Stock for perl4. The oraperl API is fully listed and described there.

- -
-
Drivers
-
- -

Users of the DBD modules may read about some of the private functions and quirks of that driver by typing:

- -
perldoc <driver>
- -

For example, the DBD::mSQL driver is bundled with driver-specific documentation that can be accessed by typing

- -
perldoc DBD::mSQL
- -
-
Frequently Asked Questions
-
- -

This document, the Frequently Asked Questions is also available as POD documentation! You can read this on your own system by typing:

- -
perldoc DBI::FAQ
- -

This may be more convenient to persons not permanently, or conveniently, connected to the Internet. The DBI::FAQ module should be downloaded and installed for the more up-to-date version.

- -

The version of DBI::FAQ shipped with the DBI module may be slightly out of date.

- -
-
POD in general
-
- -

Information on writing POD, and on the philosophy of POD in general, can be read by typing:

- -
perldoc perlpod
- -

Users with the Tk module installed may be interested to learn there is a Tk-based POD reader available called tkpod, which formats POD in a convenient and readable way. This is available via CPAN as the module called Tk::POD and is highly recommended.

- -
-
- -
-
Driver and Database Characteristics
-
- -

The driver summaries that were produced for Appendix B of "Programming the Perl DBI" are available online at:

- -
http://dbi.perl.org/
- -

in the driver information table. These summaries contain standardised information on each driver and database which should aid you in selecting a database to use. It will also inform you quickly of any issues within drivers or whether a driver is not fully compliant with the DBI Specification.

- -
-
Rambles, Tidbits and Observations
-
- -
http://dbi.perl.org/tidbits
- -

There are a series of occasional rambles from various people on the DBI mailing lists who, in an attempt to clear up a simple point, end up drafting fairly comprehensive documents. These are quite often varying in quality, but do provide some insights into the workings of the interfaces.

- -
-
Articles
-
- -

A list of articles discussing the DBI can be found on the DBI WWW page at:

- -
http://dbi.perl.org/
- -

These articles are of varying quality and age, from the original Perl Journal article written by Alligator and Tim, to more recent debacles published online from about.com.

- -
-
README files
-
- -

The README files included with each driver occasionally contains some useful information ( no, really! ) that may be pertinent to the user. Please read them. It makes our worthless existences more bearable. These can all be read from the main DBI WWW page at:

- -
http://dbi.perl.org/
- -
-
Mailing Lists
-
- -

There are three mailing lists for DBI:

- -
dbi-announce@perl.org     -- for announcements, very low traffic
-dbi-users@perl.org        -- general user support
-dbi-dev@perl.org          -- for driver developers (no user support)
- -

For information on how to subscribe, set digest mode etc, and unsubscribe, send an email message (the content will be ignored) to:

- -
dbi-announce-help@perl.org
-dbi-users-help@perl.org
-dbi-dev-help@perl.org
- -
-
Mailing List Archives
-
- -
- -
US Mailing List Archives
-
- -
http://outside.organic.com/mail-archives/dbi-users/
- -

Searchable hypermail archives of the three mailing lists, and some of the much older traffic have been set up for users to browse.

- -
-
European Mailing List Archives
-
- -
http://www.rosat.mpe-garching.mpg.de/mailing-lists/PerlDB-Interest
- -

As per the US archive above.

- -
-
- -
-
- -

Compilation Problems

- -

2.1. Compilation problems or "It fails the test!"

- -

First off, consult the README for that driver in case there is useful information about the problem. It may be a known problem for your given architecture and operating system or database. You can check the README files for each driver in advance online at:

- -
http://dbi.perl.org/
- -

If it's a known problem, you'll probably have to wait till it gets fixed. If you're really needing it fixed, try the following:

- -
- -
Attempt to fix it yourself
-
- -

This technique is generally not recommended to the faint-hearted. If you do think you have managed to fix it, then, send a patch file ( context diff ) to the author with an explanation of:

- -
    - -
  • What the problem was, and test cases, if possible.

    - -
  • -
  • What you needed to do to fix it. Please make sure you mention everything.

    - -
  • -
  • Platform information, database version, perl version, module version and DBI version.

    - -
  • -
- -
-
Email the author Do NOT whinge!
-
- -

Please email the address listed in the WWW pages for whichever driver you are having problems with. Do not directly email the author at a known address unless it corresponds with the one listed.

- -

We tend to have real jobs to do, and we do read the mailing lists for problems. Besides, we may not have access to <insert your favourite brain-damaged platform here> and couldn't be of any assistance anyway! Apologies for sounding harsh, but that's the way of it!

- -

However, you might catch one of these creative genii at 3am when we're doing this sort of stuff anyway, and get a patch within 5 minutes. The atmosphere in the DBI circle is that we do appreciate the users' problems, since we work in similar environments.

- -

If you are planning to email the author, please furnish as much information as possible, ie:

- -
    - -
  • ALL the information asked for in the README file in the problematic module. And we mean ALL of it. We don't put lines like that in documentation for the good of our health, or to meet obscure README file standards of length.

    - -
  • -
  • If you have a core dump, try the Devel::CoreStack module for generating a stack trace from the core dump. Send us that too. Devel::CoreStack can be found on CPAN at:

    - -
    http://www.perl.com/cgi-bin/cpan_mod?module=Devel::CoreStack
    - -
  • -
  • Module versions, perl version, test cases, operating system versions and any other pertinent information.

    - -
  • -
- -

Remember, the more information you send us, the quicker we can track problems down. If you send us no useful information, expect nothing back.

- -

Finally, please be aware that some authors, including Tim Bunce, specifically request that you do not mail them directly. Please respect their wishes and use the email addresses listed in the appropriate module README file.

- -
-
Email the dbi-users Mailing List
-
- -

It's usually a fairly intelligent idea to cc the mailing list anyway with problems. The authors all read the lists, so you lose nothing by mailing there.

- -
-
- -

Platform and Driver Issues

- -

3.1 What's the difference between ODBC and DBI?

- -

In terms of architecture - not much: Both define programming interfaces. Both allow multiple drivers to be loaded to do the actual work.

- -

In terms of ease of use - much: The DBI is a 'high level' interface that, like Perl itself, strives to make the simple things easy while still making the hard things possible. The ODBC is a 'low level' interface. All nuts-bolts-knobs-and-dials.

- -

Now there's an ODBC driver for the DBI (DBD::ODBC) the "What's the difference" question is more usefully rephrased as:

- -

Chapter 7 of "Programming the Perl DBI" covers this topic in far more detail and should be consulted.

- -

3.2 What's the difference between Win32::ODBC and DBD::ODBC?

- -

The DBI, and thus DBD::ODBC, has a different philosophy from the Win32::ODBC module:

- -

The Win32::ODBC module is a 'thin' layer over the low-level ODBC API. The DBI defines a simpler 'higher level' interface.

- -

The Win32::ODBC module gives you access to more of the ODBC API. The DBI and DBD::ODBC give you access to only the essentials. (But, unlike Win32::ODBC, the DBI and DBD::ODBC do support parameter binding and multiple prepared statements which reduces the load on the database server and can dramatically increase performance.)

- -

The Win32::ODBC module only works on Win32 systems. The DBI and DBD::ODBC are very portable and work on Win32 and Unix.

- -

The DBI and DBD::ODBC modules are supplied as a standard part of the Perl 5.004 binary distribution for Win32 (they don't work with the older, non-standard, ActiveState port).

- -

Scripts written with the DBI and DBD::ODBC are faster than Win32::ODBC on Win32 and are trivially portable to other supported database types.

- -

The DBI offers optional automatic printing or die()ing on errors which makes applications simpler and more robust.

- -

The current DBD::ODBC driver version 0.16 is new and not yet fully stable. A new release is due soon [relative to the date of the next TPJ issue :-] and will be much improved and offer more ODBC functionality.

- -

To summarise: The Win32::ODBC module is your best choice if you need access to more of the ODBC API than the DBI gives you. Otherwise, the DBI and DBD::ODBC combination may be your best bet.

- -

Chapter 7 of "Programming the Perl DBI" covers this topic in far more detail and should be consulted.

- -

3.3 Is DBI supported under Windows 95 / NT platforms?

- -

Finally, yes! Jeff Urlwin has been working diligently on building DBI and DBD::ODBC under these platforms, and, with the advent of a stabler perl and a port of MakeMaker, the project has come on by great leaps and bounds.

- -

The DBI and DBD::Oracle Win32 ports are now a standard part of DBI, so, downloading DBI of version higher than 0.81 should work fine as should using the most recent DBD::Oracle version.

- -

3.4 Can I access Microsoft Access or SQL-Server databases with DBI?

- -

Yes, use the DBD::ODBC driver.

- -

3.5 Is there a DBD for <insert favourite database here>?

- -

First check if a driver is available on CPAN by searching for the name of the database (including common abbreviations and aliases).

- -

Here's a general query that'll match all distributions:

- -
http://search.cpan.org/search?query=DBD&mode=dist
- -

If you can't find a driver that way, you could check if the database supports ODBC drivers. If so then you could probably use the DBD::ODBC driver:

- -
http://search.cpan.org/dist/DBD-ODBC/
- -

If not, then try asking on the dbi-users mailing list.

- -

3.6 What's DBM? And why should I use DBI instead?

- -

Extracted from ``DBI - The Database Interface for Perl 5'':

- -
``UNIX was originally blessed with simple file-based ``databases'', namely
-the dbm system. dbm lets you store data in files, and retrieve
-that data quickly. However, it also has serious drawbacks.
-
-    File Locking
-
-    The dbm systems did not allow particularly robust file locking
-    capabilities, nor any capability for correcting problems arising through
-    simultaneous writes [ to the database ].
-
-    Arbitrary Data Structures
-
-    The dbm systems only allows a single fixed data structure:
-    key-value pairs. That value could be a complex object, such as a
-    [ C ] struct, but the key had to be unique. This was a large
-    limitation on the usefulness of dbm systems.
-
-However, dbm systems still provide a useful function for users with
-simple datasets and limited resources, since they are fast, robust and
-extremely well-tested. Perl modules to access dbm systems have now
-been integrated into the core Perl distribution via the
-AnyDBM_File module.''
- -

To sum up, DBM is a perfectly satisfactory solution for essentially read-only databases, or small and simple datasets. However, for more scalable dataset handling, not to mention robust transactional locking, users are recommended to use a more powerful database engine via DBI.

- -

Chapter 2 of "Programming the Perl DBI" discusses DBM files in detail.

- -

3.7 What database do you recommend me using?

- -

This is a particularly thorny area in which an objective answer is difficult to come by, since each dataset, proposed usage and system configuration differs from person to person.

- -

From the current author's point of view, if the dataset is relatively small, being tables of less than 1 million rows, and less than 1000 tables in a given database, then mSQL is a perfectly acceptable solution to your problem. This database is extremely cheap, is wonderfully robust and has excellent support. More information is available on the Hughes Technology WWW site at:

- -
http://www.hughes.com.au
- -

You may also wish to look at MySQL which is a more powerful database engine that has a similar feel to mSQL.

- -
http://www.tcx.se
- -

If the dataset is larger than 1 million row tables or 1000 tables, or if you have either more money, or larger machines, I would recommend Oracle RDBMS. Oracle's WWW site is an excellent source of more information.

- -
http://www.oracle.com
- -

Informix is another high-end RDBMS that is worth considering. There are several differences between Oracle and Informix which are too complex for this document to detail. Information on Informix can be found on their WWW site at:

- -
http://www.informix.com
- -

In the case of WWW fronted applications, mSQL may be a better option due to slow connection times between a CGI script and the Oracle RDBMS and also the amount of resource each Oracle connection will consume. mSQL is lighter resource-wise and faster.

- -

These views are not necessarily representative of anyone else's opinions, and do not reflect any corporate sponsorship or views. They are provided as-is.

- -

3.8 Is <insert feature here> supported in DBI?

- -

Given that we're making the assumption that the feature you have requested is a non-standard database-specific feature, then the answer will be no.

- -

DBI reflects a generic API that will work for most databases, and has no database-specific functionality.

- -

However, driver authors may, if they so desire, include hooks to database-specific functionality through the func() method defined in the DBI API. Script developers should note that use of functionality provided via the func() methods is very unlikely to be portable across databases.

- -

Programming Questions

- -

4.1 Is DBI any use for CGI programming?

- -

In a word, yes! DBI is hugely useful for CGI programming! In fact, I would tentatively say that CGI programming is one of two top uses for DBI.

- -

DBI confers the ability to CGI programmers to power WWW-fronted databases to their users, which provides users with vast quantities of ordered data to play with. DBI also provides the possibility that, if a site is receiving far too much traffic than their database server can cope with, they can upgrade the database server behind the scenes with no alterations to the CGI scripts.

- -

4.2 How do I get faster connection times with DBD::Oracle and CGI?

- -
Contributed by John D. Groenveld
- -

The Apache httpd maintains a pool of httpd children to service client requests.

- -

Using the Apache mod_perl module by Doug MacEachern, the perl interpreter is embedded with the httpd children. The CGI, DBI, and your other favorite modules can be loaded at the startup of each child. These modules will not be reloaded unless changed on disk.

- -

For more information on Apache, see the Apache Project's WWW site:

- -
http://www.apache.org
- -

The mod_perl module can be downloaded from CPAN via:

- -
http://www.perl.com/cgi-bin/cpan_mod?module=Apache
- -

4.3 How do I get persistent connections with DBI and CGI?

- -
Contributed by John D. Groenveld
- -

Using Edmund Mergl's Apache::DBI module, database logins are stored in a hash with each of these httpd child. If your application is based on a single database user, this connection can be started with each child. Currently, database connections cannot be shared between httpd children.

- -

Apache::DBI can be downloaded from CPAN via:

- -
http://www.perl.com/cgi-bin/cpan_mod?module=Apache::DBI
- -

4.4 ``When I run a perl script from the command line, it works, but, when I run it under the httpd, it fails!'' Why?

- -

Basically, a good chance this is occurring is due to the fact that the user that you ran it from the command line as has a correctly configured set of environment variables, in the case of DBD::Oracle, variables like ORACLE_HOME, ORACLE_SID or TWO_TASK.

- -

The httpd process usually runs under the user id of nobody, which implies there is no configured environment. Any scripts attempting to execute in this situation will correctly fail.

- -

One way to solve this problem is to set the environment for your database in a BEGIN { } block at the top of your script. Another technique is to configure your WWW server to pass-through certain environment variables to your CGI scripts.

- -

Similarly, you should check your httpd error logfile for any clues, as well as the ``Idiot's Guide To Solving Perl / CGI Problems'' and ``Perl CGI Programming FAQ'' for further information. It is unlikely the problem is DBI-related.

- -

The ``Idiot's Guide To Solving Perl / CGI Problems'' can be located at:

- -
http://www.perl.com/perl/faq/index.html
- -

as can the ``Perl CGI Programming FAQ''. Read BOTH these documents carefully!

- -

4.5 How do I get the number of rows returned from a SELECT statement?

- -

Count them. Read the DBI docs for the rows() method.

- -

Miscellaneous Questions

- -

5.1 Can I do multi-threading with DBI?

- -

Perl version 5.005 and later can be built to support multi-threading. The DBI, as of version 1.02, does not yet support multi-threading so it would be unsafe to let more than one thread enter the DBI at the same time.

- -

It is expected that some future version of the DBI will at least be thread-safe (but not thread-hot) by automatically blocking threads entering the DBI while it's already in use.

- -

5.2 How do I handle BLOB data with DBI?

- -

Handling BLOB data with the DBI is very straight-forward. BLOB columns are specified in a SELECT statement as per normal columns. However, you also need to specify a maximum BLOB size that the <I>database handle</I> can fetch using the LongReadLen attribute.

- -

For example:

- -
### $dbh is a connected database handle
-$sth = $dbh->prepare( "SELECT blob_column FROM blobby_table" );
-$sth->execute;
- -

would fail.

- -
### $dbh is a connected database handle
-### Set the maximum BLOB size...
-$dbh->{LongReadLen} = 16384;        ### 16Kb...Not much of a BLOB!
-
-$sth = $dbh->prepare( "..." );
- -

would succeed <I>provided no column values were larger than the specified value</I>.

- -

If the BLOB data is longer than the value of LongReadLen, then an error will occur. However, the DBI provides an additional piece of functionality that will automatically truncate the fetched BLOB to the size of LongReadLen if it is longer. This does not cause an error to occur, but may make your fetched BLOB data useless.

- -

This behaviour is regulated by the LongTruncOk attribute which is set to a false value by default ( thus making overlong BLOB fetches fail ).

- -
### Set BLOB handling such that it's 16Kb and can be truncated
-$dbh->{LongReadLen} = 16384;
-$dbh->{LongTruncOk} = 1;
- -

Truncation of BLOB data may not be a big deal in cases where the BLOB contains run-length encoded data, but data containing checksums at the end, for example, a ZIP file, would be rendered useless.

- -

5.3 How can I invoke stored procedures with DBI?

- -

The DBI does not define a database-independent way of calling stored procedures.

- -

However, most database that support them also provide a way to call them from SQL statements - and the DBI certainly supports that.

- -

So, assuming that you have created a stored procedure within the target database, eg, an Oracle database, you can use $dbh->do() to immediately execute the procedure. For example,

- -
$dbh->do( "BEGIN someProcedure; END;" );   # Oracle-specific
- -

You should also be able to prepare and execute, which is the recommended way if you'll be calling the procedure often.

- -

5.4 How can I get return values from stored procedures with DBI?

- -
Contributed by Jeff Urlwin
-
-$sth = $dbh->prepare( "BEGIN foo(:1, :2, :3); END;" );
-$sth->bind_param(1, $a);
-$sth->bind_param_inout(2, \$path, 2000);
-$sth->bind_param_inout(3, \$success, 2000);
-$sth->execute;
- -

Remember to perform error checking, though! ( Or use the RaiseError attribute ).

- -

5.5 How can I create or drop a database with DBI?

- -

Database creation and deletion are concepts that are entirely too abstract to be adequately supported by DBI. For example, Oracle does not support the concept of dropping a database at all! Also, in Oracle, the database server essentially is the database, whereas in mSQL, the server process runs happily without any databases created in it. The problem is too disparate to attack in a worthwhile way.

- -

Some drivers, therefore, support database creation and deletion through the private func() methods. You should check the documentation for the drivers you are using to see if they support this mechanism.

- -

5.6 How can I commit or rollback a statement with DBI?

- -

See the commit() and rollback() methods in the DBI Specification.

- -

Chapter 6 of "Programming the Perl DBI" discusses transaction handling within the context of DBI in more detail.

- -

5.7 How are NULL values handled by DBI?

- -

NULL values in DBI are specified to be treated as the value undef. NULLs can be inserted into databases as NULL, for example:

- -
$rv = $dbh->do( "INSERT INTO table VALUES( NULL )" );
- -

but when queried back, the NULLs should be tested against undef. This is standard across all drivers.

- -

5.8 What are these func() methods all about?

- -

The func() method is defined within DBI as being an entry point for database-specific functionality, eg, the ability to create or drop databases. Invoking these driver-specific methods is simple, for example, to invoke a createDatabase method that has one argument, we would write:

- -
$rv =$dbh->func( 'argument', 'createDatabase' );
- -

Software developers should note that the func() methods are non-portable between databases.

- -

5.9 Is DBI Year 2000 Compliant?

- -

DBI has no knowledge of understanding of what dates are. Therefore, DBI itself does not have a Year 2000 problem. Individual drivers may use date handling code internally and therefore be potentially susceptible to the Year 2000 problem, but this is unlikely.

- -

You may also wish to read the ``Does Perl have a Year 2000 problem?'' section of the Perl FAQ at:

- -
http://www.perl.com/CPAN/doc/FAQs/FAQ/PerlFAQ.html
- -

Support and Training

- -

The Perl5 Database Interface is FREE software. IT COMES WITHOUT WARRANTY OF ANY KIND. See the DBI README for more details.

- -

However, some organizations are providing either technical support or training programs on DBI. The present author has no knowledge as to the quality of these services. The links are included for reference purposes only and should not be regarded as recommendations in any way. Caveat emptor.

- -

Commercial Support

- -
- -
The Perl Clinic
-
- -

The Perl Clinic provides commercial support for Perl and Perl related problems, including the DBI and its drivers. Support is provided by the company with whom Tim Bunce, author of DBI and DBD::Oracle, works and ActiveState. For more information on their services, please see:

- -
http://www.perlclinic.com
- -
-
- -

Training

- -
- -
Westlake Solutions
-
- -

A hands-on class for experienced Perl CGI developers that teaches how to write database-connected CGI scripts using Perl and DBI.pm. This course, along with four other courses on CGI scripting with Perl, is taught in Washington, DC; Arlington, Virginia; and on-site worldwide upon request.

- -

See:

- -
http://www.westlake.com/training
- -

for more details.

- -
-
- -

Other References

- -

In this section, we present some miscellaneous WWW links that may be of some interest to DBI users. These are not verified and may result in unknown sites or missing documents.

- -
http://www-ccs.cs.umass.edu/db.html
-http://www.odmg.org/odmg93/updates_dbarry.html
-http://www.jcc.com/sql_stnd.html
- -

AUTHOR

- -

Alligator Descartes. Portions are Copyright their original stated authors.

- -

COPYRIGHT

- -

This document is Copyright (c)1994-2000 Alligator Descartes, with portions Copyright (c)1994-2000 their original authors. This module is released under the 'Artistic' license which you can find in the perl distribution.

- -

This document is Copyright (c)1997-2000 Alligator Descartes. All rights reserved. Permission to distribute this document, in full or in part, via email, Usenet, ftp archives or http is granted providing that no charges are involved, reasonable attempt is made to use the most current version and all credits and copyright notices are retained ( the AUTHOR and COPYRIGHT sections ). Requests for other distribution rights, including incorporation into commercial products, such as books, magazine articles or CD-ROMs should be made to Alligator Descartes.

- - - - - - - - - - diff --git a/doc/DBI::FAQ.md b/doc/DBI::FAQ.md deleted file mode 100644 index e7e81b9c..00000000 --- a/doc/DBI::FAQ.md +++ /dev/null @@ -1,897 +0,0 @@ -# NAME - -DBI::FAQ -- The Frequently Asked Questions for the Perl5 Database Interface - -
- - - -
- - DBI Frequently Asked Questions v.0.38 - -
- - Last updated: February 8th, 2000 - -
-

-

- -# SYNOPSIS - - perldoc DBI::FAQ - -# VERSION - -This document is currently at version _0.38_, as of _February 8th, 2000_. - -That's **very** old. A newer FAQ can be found at [http://faq.dbi-support.com/](http://faq.dbi-support.com/) - -Neither this document nor that web site are actively maintained. -Volunteers are welcome. - -# DESCRIPTION - -This document serves to answer the most frequently asked questions on both -the DBI Mailing Lists and personally to members of the DBI development team. - -# Basic Information & Information Sources - -## 1.1 What is DBI, DBperl, Oraperl and \*perl? - -To quote Tim Bunce, the architect and author of DBI: - - DBI is a database access Application Programming Interface (API) - for the Perl Language. The DBI API Specification defines a set - of functions, variables and conventions that provide a consistent - database interface independent of the actual database being used. - -In simple language, the DBI interface allows users to access multiple database -types transparently. So, if you connecting to an Oracle, Informix, mSQL, Sybase -or whatever database, you don't need to know the underlying mechanics of the -3GL layer. The API defined by DBI will work on _all_ these database types. - -A similar benefit is gained by the ability to connect to two _different_ -databases of different vendor within the one perl script, _ie_, I want -to read data from an Oracle database and insert it back into an Informix -database all within one program. The DBI layer allows you to do this simply -and powerfully. - -
- - Here's a diagram that demonstrates the principle: -

-

- [ DBI Architecture ] -
-

-

- -_DBperl_ is the old name for the interface specification. It's usually -now used to denote perl_4_ modules on database interfacing, such as, -_oraperl_, _isqlperl_, _ingperl_ and so on. These interfaces -didn't have a standard API and are generally _not_ supported. - -Here's a list of DBperl modules, their corresponding DBI counterparts and -support information. _Please note_, the author's listed here generally -_do not_ maintain the DBI module for the same database. These email -addresses are unverified and should only be used for queries concerning the -perl4 modules listed below. DBI driver queries should be directed to the -_dbi-users_ mailing list. - - Module Name Database Required Author DBI - ----------- ----------------- ------ --- - Sybperl Sybase Michael Peppler DBD::Sybase - - Oraperl Oracle 6 & 7 Kevin Stock DBD::Oracle - - Ingperl Ingres Tim Bunce & DBD::Ingres - Ted Lemon - - Interperl Interbase Buzz Moschetti DBD::Interbase - - Uniperl Unify 5.0 Rick Wargo None - - Pgperl Postgres Igor Metz DBD::Pg - - Btreeperl NDBM John Conover SDBM? - - Ctreeperl C-Tree John Conover None - - Cisamperl Informix C-ISAM Mathias Koerber None - - Duaperl X.500 Directory Eric Douglas None - User Agent - -However, some DBI modules have DBperl emulation layers, so, _DBD::Oracle_ -comes with an Oraperl emulation layer, which allows you to run legacy oraperl -scripts without modification. The emulation layer translates the oraperl API -calls into DBI calls and executes them through the DBI switch. - -Here's a table of emulation layer information: - - Module Emulation Layer Status - ------ --------------- ------ - DBD::Oracle Oraperl Complete - DBD::Informix Isqlperl Under development - DBD::Ingres Ingperl Complete? - DBD::Sybase Sybperl Working? ( Needs verification ) - DBD::mSQL Msqlperl Experimentally released with - DBD::mSQL-0.61 - -The _Msqlperl_ emulation is a special case. _Msqlperl_ is a perl5 driver -for _mSQL_ databases, but does not conform to the DBI Specification. It's -use is being deprecated in favour of _DBD::mSQL_. _Msqlperl_ may be downloaded -from CPAN _via_: - - http://www.perl.com/cgi-bin/cpan_mod?module=Msqlperl - -## 1.2. Where can I get it from? - -The Comprehensive Perl Archive Network -resources should be used for retrieving up-to-date versions of the DBI -and drivers. CPAN may be accessed _via_ Tom Christiansen's splendid -_CPAN multiplexer_ program located at: - - http://www.perl.com/CPAN/ - -For more specific version information and exact URLs of drivers, please see -the DBI drivers list and the DBI module pages which can be found on: - - http://dbi.perl.org/ - -This list is automatically generated on a nightly basis from CPAN and should -be up-to-date. - -## 1.3. Where can I get more information? - -There are a few information sources on DBI. - -- _"Programming the Perl DBI"_ - - "Programming the Perl DBI" is the _official_ book on the DBI written by - Alligator Descartes and Tim Bunce and published by O'Reilly & Associates. - The book was released on February 9th, 2000. - - The table of contents is: - - Preface - 1. Introduction - From Mainframes to Workstations - Perl - DBI in the Real World - A Historical Interlude and Standing Stones - 2. Basic Non-DBI Databases - Storage Managers and Layers - Query Languages and Data Functions - Standing Stones and the Sample Database - Flat-File Databases - Putting Complex Data into Flat Files - Concurrent Database Access and Locking - DBM Files and the Berkeley Database Manager - The MLDBM Module - Summary - 3. SQL and Relational Databases - The Relational Database Methodology - Datatypes and NULL Values - Querying Data - Modifying Data Within Tables - Creating and Destroying Tables - 4. Programming with the DBI - DBI Architecture - Handles - Data Source Names - Connection and Disconnection - Error Handling - Utility Methods and Functions - 5. Interacting with the Database - Issuing Simple Queries - Executing Non-SELECT Statements - Binding Parameters to Statements - Binding Output Columns - do() Versus prepare() - Atomic and Batch Fetching - 6. Advanced DBI - Handle Attributes and Metadata - Handling LONG/LOB Data - Transactions, Locking, and Isolation - 7. ODBC and the DBI - ODBC -- Embraced and Extended - DBI -- Thrashed and Mutated - The Nuts and Bolts of ODBC - ODBC from Perl - The Marriage of DBI and ODBC - Questions and Choices - Moving Between Win32::ODBC and the DBI - And What About ADO? - 8. DBI Shell and Database Proxying - dbish -- The DBI Shell - Database Proxying - A. DBI Specification - B. Driver and Database Characteristics - C. ASLaN Sacred Site Charter - Index - - The book should be available from all good bookshops and can be ordered online - either via</I> O'Reilly & Associates - - http://www.oreilly.com/catalog/perldbi - - or Amazon - - http://www.amazon.com/exec/obidos/ASIN/1565926994/dbi - -- _POD documentation_ - - _POD_s are chunks of documentation usually embedded within perl programs - that document the code \`\`_in place_'', providing a useful resource for - programmers and users of modules. POD for DBI and drivers is beginning to - become more commonplace, and documentation for these modules can be read - with the `perldoc` program included with Perl. - - - The DBI Specification - - The POD for the DBI Specification can be read with the: - - perldoc DBI - - command. The Specification also forms Appendix A of "Programming the Perl - DBI". - - - Oraperl - - Users of the Oraperl emulation layer bundled with _DBD::Oracle_, may read - up on how to program with the Oraperl interface by typing: - - perldoc Oraperl - - This will produce an updated copy of the original oraperl man page written by - Kevin Stock for perl4. The oraperl API is fully listed and described there. - - - Drivers - - Users of the DBD modules may read about some of the private functions - and quirks of that driver by typing: - - perldoc - - For example, the _DBD::mSQL_ driver is bundled with driver-specific - documentation that can be accessed by typing - - perldoc DBD::mSQL - - - Frequently Asked Questions - - This document, the _Frequently Asked Questions_ is also available as POD - documentation! You can read this on your own system by typing: - - perldoc DBI::FAQ - - This may be more convenient to persons not permanently, or conveniently, - connected to the Internet. The _DBI::FAQ_ module should be downloaded and - installed for the more up-to-date version. - - The version of _DBI::FAQ_ shipped with the `DBI` module may be slightly out - of date. - - - POD in general - - Information on writing POD, and on the philosophy of POD in general, can be - read by typing: - - perldoc perlpod - - Users with the Tk module installed may be interested to learn there is a - Tk-based POD reader available called `tkpod`, which formats POD in a convenient - and readable way. This is available _via_ CPAN as the module called - _Tk::POD_ and is highly recommended. - -- _Driver and Database Characteristics_ - - The driver summaries that were produced for Appendix B of "Programming the - Perl DBI" are available online at: - - http://dbi.perl.org/ - - in the driver information table. These summaries contain standardised - information on each driver and database which should aid you in selecting - a database to use. It will also inform you quickly of any issues within - drivers or whether a driver is not fully compliant with the DBI Specification. - -- _Rambles, Tidbits and Observations_ - - http://dbi.perl.org/tidbits - - There are a series of occasional rambles from various people on the - DBI mailing lists who, in an attempt to clear up a simple point, end up - drafting fairly comprehensive documents. These are quite often varying in - quality, but do provide some insights into the workings of the interfaces. - -- _Articles_ - - A list of articles discussing the DBI can be found on the DBI WWW page at: - - http://dbi.perl.org/ - - These articles are of varying quality and age, from the original Perl Journal - article written by Alligator and Tim, to more recent debacles published online - from about.com. - -- _README files_ - - The _README_ files included with each driver occasionally contains - some useful information ( no, really! ) that may be pertinent to the user. - Please read them. It makes our worthless existences more bearable. These - can all be read from the main DBI WWW page at: - - http://dbi.perl.org/ - -- _Mailing Lists_ - - There are three mailing lists for DBI: - - dbi-announce@perl.org -- for announcements, very low traffic - dbi-users@perl.org -- general user support - dbi-dev@perl.org -- for driver developers (no user support) - - For information on how to subscribe, set digest mode etc, and unsubscribe, - send an email message (the content will be ignored) to: - - dbi-announce-help@perl.org - dbi-users-help@perl.org - dbi-dev-help@perl.org - -- _Mailing List Archives_ - - _US Mailing List Archives_ - - http://outside.organic.com/mail-archives/dbi-users/ - - Searchable hypermail archives of the three mailing lists, and some of the - much older traffic have been set up for users to browse. - - - _European Mailing List Archives_ - - http://www.rosat.mpe-garching.mpg.de/mailing-lists/PerlDB-Interest - - As per the US archive above. - -# Compilation Problems - -## 2.1. Compilation problems or "It fails the test!" - -First off, consult the README for that driver in case there is useful -information about the problem. It may be a known problem for your given -architecture and operating system or database. You can check the README -files for each driver in advance online at: - - http://dbi.perl.org/ - -If it's a known problem, you'll probably have to wait till it gets fixed. If -you're _really_ needing it fixed, try the following: - -- _Attempt to fix it yourself_ - - This technique is generally _not_ recommended to the faint-hearted. - If you do think you have managed to fix it, then, send a patch file - ( context diff ) to the author with an explanation of: - - - What the problem was, and test cases, if possible. - - What you needed to do to fix it. Please make sure you mention everything. - - Platform information, database version, perl version, module version and - DBI version. - -- _Email the author_ Do _NOT_ whinge! - - Please email the address listed in the WWW pages for whichever driver you - are having problems with. Do _not_ directly email the author at a - known address unless it corresponds with the one listed. - - We tend to have real jobs to do, and we do read the mailing lists for - problems. Besides, we may not have access to <_insert your - favourite brain-damaged platform here_> and couldn't be of any - assistance anyway! Apologies for sounding harsh, but that's the way of it! - - However, you might catch one of these creative genii at 3am when we're - doing this sort of stuff anyway, and get a patch within 5 minutes. The - atmosphere in the DBI circle is that we _do_ appreciate the users' - problems, since we work in similar environments. - - If you are planning to email the author, please furnish as much information - as possible, _ie_: - - - _ALL_ the information asked for in the README file in - the problematic module. And we mean _ALL_ of it. We don't - put lines like that in documentation for the good of our health, or - to meet obscure README file standards of length. - - If you have a core dump, try the _Devel::CoreStack_ module for - generating a stack trace from the core dump. Send us that too. - _Devel::CoreStack_ can be found on CPAN at: - - http://www.perl.com/cgi-bin/cpan_mod?module=Devel::CoreStack - - - Module versions, perl version, test cases, operating system versions - and _any other pertinent information_. - - Remember, the more information you send us, the quicker we can track - problems down. If you send us no useful information, expect nothing back. - - Finally, please be aware that some authors, including Tim Bunce, specifically - request that you do _not_ mail them directly. Please respect their wishes and - use the email addresses listed in the appropriate module `README` file. - -- _Email the dbi-users Mailing List_ - - It's usually a fairly intelligent idea to _cc_ the mailing list - anyway with problems. The authors all read the lists, so you lose nothing - by mailing there. - -# Platform and Driver Issues - -## 3.1 What's the difference between ODBC and DBI? - -In terms of architecture - not much: Both define programming -interfaces. Both allow multiple drivers to be loaded to do the -actual work. - -In terms of ease of use - much: The DBI is a 'high level' interface -that, like Perl itself, strives to make the simple things easy while -still making the hard things possible. The ODBC is a 'low level' -interface. All nuts-bolts-knobs-and-dials. - -Now there's an ODBC driver for the DBI (DBD::ODBC) the "What's the -difference" question is more usefully rephrased as: - -Chapter 7 of "Programming the Perl DBI" covers this topic in far more -detail and should be consulted. - -## 3.2 What's the difference between Win32::ODBC and DBD::ODBC? - -The DBI, and thus DBD::ODBC, has a different philosophy from the -Win32::ODBC module: - -The Win32::ODBC module is a 'thin' layer over the low-level ODBC API. -The DBI defines a simpler 'higher level' interface. - -The Win32::ODBC module gives you access to more of the ODBC API. -The DBI and DBD::ODBC give you access to only the essentials. -(But, unlike Win32::ODBC, the DBI and DBD::ODBC do support parameter -binding and multiple prepared statements which reduces the load on -the database server and can dramatically increase performance.) - -The Win32::ODBC module only works on Win32 systems. -The DBI and DBD::ODBC are very portable and work on Win32 and Unix. - -The DBI and DBD::ODBC modules are supplied as a standard part of the -Perl 5.004 binary distribution for Win32 (they don't work with the -older, non-standard, ActiveState port). - -Scripts written with the DBI and DBD::ODBC are faster than Win32::ODBC -on Win32 and are trivially portable to other supported database types. - -The DBI offers optional automatic printing or die()ing on errors which -makes applications simpler and more robust. - -The current DBD::ODBC driver version 0.16 is new and not yet fully stable. -A new release is due soon \[relative to the date of the next TPJ issue :-\] -and will be much improved and offer more ODBC functionality. - -To summarise: The Win32::ODBC module is your best choice if you need -access to more of the ODBC API than the DBI gives you. Otherwise, the -DBI and DBD::ODBC combination may be your best bet. - -Chapter 7 of "Programming the Perl DBI" covers this topic in far more -detail and should be consulted. - -## 3.3 Is DBI supported under Windows 95 / NT platforms? - -Finally, yes! Jeff Urlwin has been working diligently on building -_DBI_ and _DBD::ODBC_ under these platforms, and, with the -advent of a stabler perl and a port of _MakeMaker_, the project has -come on by great leaps and bounds. - -The _DBI_ and _DBD::Oracle_ Win32 ports are now a standard part of DBI, -so, downloading _DBI_ of version higher than _0.81_ should work fine as -should using the most recent _DBD::Oracle_ version. - -## 3.4 Can I access Microsoft Access or SQL-Server databases with DBI? - -Yes, use the _DBD::ODBC_ driver. - -## 3.5 Is there a DBD for <_insert favourite database here_>? - -First check if a driver is available on CPAN by searching for the name of the -database (including common abbreviations and aliases). - -Here's a general query that'll match all distributions: - - http://search.cpan.org/search?query=DBD&mode=dist - -If you can't find a driver that way, you could check if the database supports -ODBC drivers. If so then you could probably use the DBD::ODBC driver: - - http://search.cpan.org/dist/DBD-ODBC/ - -If not, then try asking on the dbi-users mailing list. - -## 3.6 What's DBM? And why should I use DBI instead? - -Extracted from \`\`_DBI - The Database Interface for Perl 5_'': - - ``UNIX was originally blessed with simple file-based ``databases'', namely - the dbm system. dbm lets you store data in files, and retrieve - that data quickly. However, it also has serious drawbacks. - - File Locking - - The dbm systems did not allow particularly robust file locking - capabilities, nor any capability for correcting problems arising through - simultaneous writes [ to the database ]. - - Arbitrary Data Structures - - The dbm systems only allows a single fixed data structure: - key-value pairs. That value could be a complex object, such as a - [ C ] struct, but the key had to be unique. This was a large - limitation on the usefulness of dbm systems. - - However, dbm systems still provide a useful function for users with - simple datasets and limited resources, since they are fast, robust and - extremely well-tested. Perl modules to access dbm systems have now - been integrated into the core Perl distribution via the - AnyDBM_File module.'' - -To sum up, DBM is a perfectly satisfactory solution for essentially read-only -databases, or small and simple datasets. However, for more -scalable dataset handling, not to mention robust transactional locking, -users are recommended to use a more powerful database engine _via_ _DBI_. - -Chapter 2 of "Programming the Perl DBI" discusses DBM files in detail. - -## 3.7 What database do you recommend me using? - -This is a particularly thorny area in which an objective answer is difficult -to come by, since each dataset, proposed usage and system configuration -differs from person to person. - -From the current author's point of view, if the dataset is relatively -small, being tables of less than 1 million rows, and less than 1000 tables -in a given database, then _mSQL_ is a perfectly acceptable solution -to your problem. This database is extremely cheap, is wonderfully robust -and has excellent support. More information is available on the Hughes -Technology WWW site at: - - http://www.hughes.com.au - -You may also wish to look at MySQL which is a more powerful database engine -that has a similar feel to mSQL. - - http://www.tcx.se - -If the dataset is larger than 1 million row tables or 1000 tables, or if you -have either more money, or larger machines, I would recommend _Oracle RDBMS_. -Oracle's WWW site is an excellent source of more information. - - http://www.oracle.com - -_Informix_ is another high-end RDBMS that is worth considering. There are -several differences between Oracle and Informix which are too complex for -this document to detail. Information on Informix can be found on their -WWW site at: - - http://www.informix.com - -In the case of WWW fronted applications, _mSQL_ may be a better option -due to slow connection times between a CGI script and the Oracle RDBMS and -also the amount of resource each Oracle connection will consume. _mSQL_ -is lighter resource-wise and faster. - -These views are not necessarily representative of anyone else's opinions, -and do not reflect any corporate sponsorship or views. They are provided -_as-is_. - -## 3.8 Is <_insert feature here_> supported in DBI? - -Given that we're making the assumption that the feature you have requested -is a non-standard database-specific feature, then the answer will be _no_. - -DBI reflects a _generic_ API that will work for most databases, and has -no database-specific functionality. - -However, driver authors may, if they so desire, include hooks to database-specific -functionality through the `func()` method defined in the DBI API. -Script developers should note that use of functionality provided _via_ -the `func()` methods is very unlikely to be portable across databases. - -# Programming Questions - -## 4.1 Is DBI any use for CGI programming? - -In a word, yes! DBI is hugely useful for CGI programming! In fact, I would -tentatively say that CGI programming is one of two top uses for DBI. - -DBI confers the ability to CGI programmers to power WWW-fronted databases -to their users, which provides users with vast quantities of ordered -data to play with. DBI also provides the possibility that, if a site is -receiving far too much traffic than their database server can cope with, they -can upgrade the database server behind the scenes with no alterations to -the CGI scripts. - -## 4.2 How do I get faster connection times with DBD::Oracle and CGI? - - Contributed by John D. Groenveld - -The Apache `httpd` maintains a pool of `httpd` children to service client -requests. - -Using the Apache _mod\_perl_ module by _Doug MacEachern_, the perl -interpreter is embedded with the `httpd` children. The CGI, DBI, and your -other favorite modules can be loaded at the startup of each child. These -modules will not be reloaded unless changed on disk. - -For more information on Apache, see the Apache Project's WWW site: - - http://www.apache.org - -The _mod\_perl_ module can be downloaded from CPAN _via_: - - http://www.perl.com/cgi-bin/cpan_mod?module=Apache - -## 4.3 How do I get persistent connections with DBI and CGI? - - Contributed by John D. Groenveld - -Using Edmund Mergl's _Apache::DBI_ module, database logins are stored in a -hash with each of these `httpd` child. If your application is based on a -single database user, this connection can be started with each child. -Currently, database connections cannot be shared between `httpd` children. - -_Apache::DBI_ can be downloaded from CPAN _via_: - - http://www.perl.com/cgi-bin/cpan_mod?module=Apache::DBI - -## 4.4 \`\`When I run a perl script from the command line, it works, but, when I run it under the `httpd`, it fails!'' Why? - -Basically, a good chance this is occurring is due to the fact that the user -that you ran it from the command line as has a correctly configured set of -environment variables, in the case of _DBD::Oracle_, variables like -`ORACLE_HOME`, `ORACLE_SID` or `TWO_TASK`. - -The `httpd` process usually runs under the user id of `nobody`, -which implies there is no configured environment. Any scripts attempting to -execute in this situation will correctly fail. - -One way to solve this problem is to set the environment for your database in a -`BEGIN { }` block at the top of your script. Another technique is to configure -your WWW server to pass-through certain environment variables to your CGI -scripts. - -Similarly, you should check your `httpd` error logfile for any clues, -as well as the \`\`Idiot's Guide To Solving Perl / CGI Problems'' and -\`\`Perl CGI Programming FAQ'' for further information. It is -unlikely the problem is DBI-related. - -The \`\`Idiot's Guide To Solving Perl / CGI Problems'' can be located at: - - http://www.perl.com/perl/faq/index.html - -as can the \`\`Perl CGI Programming FAQ''. Read _BOTH_ these documents -carefully! - -## 4.5 How do I get the number of rows returned from a `SELECT` statement? - -Count them. Read the DBI docs for the `rows()` method. - -# Miscellaneous Questions - -## 5.1 Can I do multi-threading with DBI? - -Perl version 5.005 and later can be built to support multi-threading. -The DBI, as of version 1.02, does not yet support multi-threading -so it would be unsafe to let more than one thread enter the DBI at -the same time. - -It is expected that some future version of the DBI will at least be -thread-safe (but not thread-hot) by automatically blocking threads -entering the DBI while it's already in use. - -## 5.2 How do I handle BLOB data with DBI? - -Handling BLOB data with the DBI is very straight-forward. BLOB columns are -specified in a SELECT statement as per normal columns. However, you also -need to specify a maximum BLOB size that the database handle</I> can -fetch using the `LongReadLen` attribute. - -For example: - - ### $dbh is a connected database handle - $sth = $dbh->prepare( "SELECT blob_column FROM blobby_table" ); - $sth->execute; - -would fail. - - ### $dbh is a connected database handle - ### Set the maximum BLOB size... - $dbh->{LongReadLen} = 16384; ### 16Kb...Not much of a BLOB! - - $sth = $dbh->prepare( "..." ); - -would succeed provided no column values were larger than the specified -value</I>. - -If the BLOB data is longer than the value of `LongReadLen`, then an -error will occur. However, the DBI provides an additional piece of -functionality that will automatically truncate the fetched BLOB to the -size of `LongReadLen` if it is longer. This does not cause an error to -occur, but may make your fetched BLOB data useless. - -This behaviour is regulated by the `LongTruncOk` attribute which is -set to a false value by default ( thus making overlong BLOB fetches fail ). - - ### Set BLOB handling such that it's 16Kb and can be truncated - $dbh->{LongReadLen} = 16384; - $dbh->{LongTruncOk} = 1; - -Truncation of BLOB data may not be a big deal in cases where the BLOB -contains run-length encoded data, but data containing checksums at the end, -for example, a ZIP file, would be rendered useless. - -## 5.3 How can I invoke stored procedures with DBI? - -The DBI does not define a database-independent way of calling stored procedures. - -However, most database that support them also provide a way to call -them from SQL statements - and the DBI certainly supports that. - -So, assuming that you have created a stored procedure within the target -database, _eg_, an Oracle database, you can use `$dbh`->`do()` to -immediately execute the procedure. For example, - - $dbh->do( "BEGIN someProcedure; END;" ); # Oracle-specific - -You should also be able to `prepare` and `execute`, which is -the recommended way if you'll be calling the procedure often. - -## 5.4 How can I get return values from stored procedures with DBI? - - Contributed by Jeff Urlwin - - $sth = $dbh->prepare( "BEGIN foo(:1, :2, :3); END;" ); - $sth->bind_param(1, $a); - $sth->bind_param_inout(2, \$path, 2000); - $sth->bind_param_inout(3, \$success, 2000); - $sth->execute; - -Remember to perform error checking, though! ( Or use the `RaiseError` -attribute ). - -## 5.5 How can I create or drop a database with DBI? - -Database creation and deletion are concepts that are entirely too abstract -to be adequately supported by DBI. For example, Oracle does not support the -concept of dropping a database at all! Also, in Oracle, the database -_server_ essentially _is_ the database, whereas in mSQL, the -server process runs happily without any databases created in it. The -problem is too disparate to attack in a worthwhile way. - -Some drivers, therefore, support database creation and deletion through -the private `func()` methods. You should check the documentation for -the drivers you are using to see if they support this mechanism. - -## 5.6 How can I `commit` or `rollback` a statement with DBI? - -See the `commit()` and `rollback()` methods in the DBI Specification. - -Chapter 6 of "Programming the Perl DBI" discusses transaction handling within -the context of DBI in more detail. - -## 5.7 How are `NULL` values handled by DBI? - -`NULL` values in DBI are specified to be treated as the value `undef`. -`NULL`s can be inserted into databases as `NULL`, for example: - - $rv = $dbh->do( "INSERT INTO table VALUES( NULL )" ); - -but when queried back, the `NULL`s should be tested against `undef`. -This is standard across all drivers. - -## 5.8 What are these `func()` methods all about? - -The `func()` method is defined within DBI as being an entry point -for database-specific functionality, _eg_, the ability to create or -drop databases. Invoking these driver-specific methods is simple, for example, -to invoke a `createDatabase` method that has one argument, we would -write: - - $rv =$dbh->func( 'argument', 'createDatabase' ); - -Software developers should note that the `func()` methods are -non-portable between databases. - -## 5.9 Is DBI Year 2000 Compliant? - -DBI has no knowledge of understanding of what dates are. Therefore, DBI -itself does not have a Year 2000 problem. Individual drivers may use date -handling code internally and therefore be potentially susceptible to the -Year 2000 problem, but this is unlikely. - -You may also wish to read the \`\`Does Perl have a Year 2000 problem?'' section -of the Perl FAQ at: - - http://www.perl.com/CPAN/doc/FAQs/FAQ/PerlFAQ.html - -# Support and Training - -The Perl5 Database Interface is _FREE_ software. IT COMES WITHOUT WARRANTY -OF ANY KIND. See the DBI README for more details. - -However, some organizations are providing either technical support or -training programs on DBI. The present author has no knowledge as -to the quality of these services. The links are included for reference -purposes only and should not be regarded as recommendations in any way. -_Caveat emptor_. - -## Commercial Support - -- The Perl Clinic - - The Perl Clinic provides commercial support for _Perl_ and Perl - related problems, including the _DBI_ and its drivers. Support is - provided by the company with whom Tim Bunce, author of _DBI_ and - _DBD::Oracle_, works and ActiveState. For more information on their - services, please see: - - http://www.perlclinic.com - -## Training - -- Westlake Solutions - - A hands-on class for experienced Perl CGI developers that teaches - how to write database-connected CGI scripts using Perl and DBI.pm. This - course, along with four other courses on CGI scripting with Perl, is - taught in Washington, DC; Arlington, Virginia; and on-site worldwide upon - request. - - See: - - http://www.westlake.com/training - - for more details. - -# Other References - -In this section, we present some miscellaneous WWW links that may be of -some interest to DBI users. These are not verified and may result in -unknown sites or missing documents. - - http://www-ccs.cs.umass.edu/db.html - http://www.odmg.org/odmg93/updates_dbarry.html - http://www.jcc.com/sql_stnd.html - -# AUTHOR - -Alligator Descartes. -Portions are Copyright their original stated authors. - -# COPYRIGHT - -This document is Copyright (c)1994-2000 Alligator Descartes, with portions -Copyright (c)1994-2000 their original authors. This module is released under -the 'Artistic' license which you can find in the perl distribution. - -This document is Copyright (c)1997-2000 Alligator Descartes. All rights reserved. -Permission to distribute this document, in full or in part, via email, -Usenet, ftp archives or http is granted providing that no charges are involved, -reasonable attempt is made to use the most current version and all credits -and copyright notices are retained ( the _AUTHOR_ and _COPYRIGHT_ sections ). -Requests for other distribution rights, including incorporation into -commercial products, such as books, magazine articles or CD-ROMs should be -made to Alligator Descartes. - -
- - - - -
diff --git a/doc/DBI::Test::DBI::Case.html b/doc/DBI::Test::DBI::Case.html deleted file mode 100644 index 5ec82396..00000000 --- a/doc/DBI::Test::DBI::Case.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/doc/DBI::Test::DBI::Conf.html b/doc/DBI::Test::DBI::Conf.html deleted file mode 100644 index 5ec82396..00000000 --- a/doc/DBI::Test::DBI::Conf.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/doc/DBI::Test::DBI::List.html b/doc/DBI::Test::DBI::List.html deleted file mode 100644 index 5ec82396..00000000 --- a/doc/DBI::Test::DBI::List.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - -