📄 dbi::faq.3
字号:
.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05).\".\" Standard preamble:.\" ========================================================================.de Sh \" Subsection heading.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...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...\" Set up some character translations and predefined strings. \*(-- will.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left.\" double quote, and \*(R" will give a right double quote. \*(C+ will.\" give a nicer C++. Capital omega is used to do unbreakable dashes and.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,.\" nothing in troff, for use with C<>..tr \(*W-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'.ie n \{\. ds -- \(*W-. ds PI pi. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch. ds L" "". ds R" "". ds C` "". ds C' ""'br\}.el\{\. ds -- \|\(em\|. ds PI \(*p. ds L" ``. ds R" '''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 turned on, we'll generate index entries on stderr for.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index.\" entries marked with X<> in POD. Of course, you'll have to process the.\" output yourself in some meaningful fashion..ie \nF \{\. de IX. tm Index:\\$1\t\\n%\t"\\$2"... nr % 0. rr F.\}.el \{\. de IX...\}.\".\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2)..\" Fear. Run. Save yourself. No user-serviceable parts.. \" fudge factors for nroff and troff.if n \{\. ds #H 0. ds #V .8m. ds #F .3m. ds #[ \f1. ds #] \fP.\}.if t \{\. ds #H ((1u-(\\\\n(.fu%2u))*.13m). ds #V .6m. ds #F 0. ds #[ \&. ds #] \&.\}. \" simple accents for nroff and troff.if n \{\. ds ' \&. ds ` \&. ds ^ \&. ds , \&. ds ~ ~. ds /.\}.if t \{\. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u". ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'.\}. \" troff and (daisy-wheel) nroff accents.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'.ds 8 \h'\*(#H'\(*b\h'-\*(#H'.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#].ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#].ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#].ds ae a\h'-(\w'a'u*4/10)'e.ds Ae A\h'-(\w'A'u*4/10)'E. \" corrections for vroff.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'. \" for low resolution devices (crt and lpr).if \n(.H>23 .if \n(.V>19 \\{\. ds : e. ds 8 ss. ds o a. ds d- d\h'-1'\(ga. ds D- D\h'-1'\(hy. ds th \o'bp'. ds Th \o'LP'. ds ae ae. ds Ae AE.\}.rm #[ #] #H #V #F C.\" ========================================================================.\".IX Title "DBI::FAQ 3".TH DBI::FAQ 3 "2007-05-09" "perl v5.10.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..SH "DESCRIPTION".IX Header "DESCRIPTION"This document serves to answer the most frequently asked questions on boththe \s-1DBI\s0 Mailing Lists and personally to members of the \s-1DBI\s0 development team..SH "Basic Information & Information Sources".IX Header "Basic Information & Information Sources".Sh "1.1 What is \s-1DBI\s0, DBperl, Oraperl and *perl?".IX Subsection "1.1 What is DBI, DBperl, Oraperl and *perl?"To quote Tim Bunce, the architect and author of \s-1DBI:\s0.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 independant of the actual database being used.\*(Aq\*(Aq.Ve.PPIn simple language, the \s-1DBI\s0 interface allows users to access multiple databasetypes transparently. So, if you connecting to an Oracle, Informix, mSQL, Sybaseor whatever database, you don't need to know the underlying mechanics of the3GL layer. The \s-1API\s0 defined by \s-1DBI\s0 will work on \fIall\fR these database types..PPA similar benefit is gained by the ability to connect to two \fIdifferent\fRdatabases of different vendor within the one perl script, \fIie\fR, I wantto read data from an Oracle database and insert it back into an Informixdatabase all within one program. The \s-1DBI\s0 layer allows you to do this simplyand powerfully..PP\&\fIDBperl\fR is the old name for the interface specification. It's usuallynow used to denote perl\fI4\fR modules on database interfacing, such as,\&\fIoraperl\fR, \fIisqlperl\fR, \fIingperl\fR and so on. These interfacesdidn't have a standard \s-1API\s0 and are generally \fInot\fR supported..PPHere's a list of DBperl modules, their corresponding \s-1DBI\s0 counterparts andsupport information. \fIPlease note\fR, the author's listed here generally\&\fIdo not\fR maintain the \s-1DBI\s0 module for the same database. These emailaddresses are unverified and should only be used for queries concerning theperl4 modules listed below. \s-1DBI\s0 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\& <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.Ve.PPHowever, some \s-1DBI\s0 modules have DBperl emulation layers, so, \fIDBD::Oracle\fRcomes with an Oraperl emulation layer, which allows you to run legacy oraperlscripts without modification. The emulation layer translates the oraperl \s-1API\s0calls into \s-1DBI\s0 calls and executes them through the \s-1DBI\s0 switch..PPHere's 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.PPThe \fIMsqlperl\fR emulation is a special case. \fIMsqlperl\fR is a perl5 driverfor \fImSQL\fR databases, but does not conform to the \s-1DBI\s0 Specification. It'suse is being deprecated in favour of \fIDBD::mSQL\fR. \fIMsqlperl\fR may be downloadedfrom \s-1CPAN\s0 \fIvia\fR:.PP.Vb 1\& http://www.perl.com/cgi\-bin/cpan_mod?module=Msqlperl.Ve.Sh "1.2. Where can I get it from?".IX Subsection "1.2. Where can I get it from?"The Comprehensive Perl Archive Networkresources should be used for retrieving up-to-date versions of the \s-1DBI\s0and drivers. \s-1CPAN\s0 may be accessed \fIvia\fR Tom Christiansen's splendid \&\fI\s-1CPAN\s0 multiplexer\fR program located at:.PP.Vb 1\& http://www.perl.com/CPAN/.Ve.PPFor more specific version information and exact URLs of drivers, please seethe \s-1DBI\s0 drivers list and the \s-1DBI\s0 module pages which can be found on:.PP.Vb 2\& http://dbi.perl.org/\& http://www.symbolstone.org/technology/perl/DBI.Ve.PPThis list is automatically generated on a nightly basis from \s-1CPAN\s0 and shouldbe up-to-date..Sh "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 \s-1DBI\s0..ie n .IP "\fI""Programming the Perl \s-1DBI\s0""\fR" 4.el .IP "\fI``Programming the Perl \s-1DBI\s0''\fR" 4.IX Item "Programming the Perl DBI"\&\*(L"Programming the Perl \s-1DBI\s0\*(R" is the \fIofficial\fR book on the \s-1DBI\s0 written byAlligator Descartes and Tim Bunce and published by O'Reilly & Associates.The book was released on February 9th, 2000..SpThe 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.SpThe book should be available from all good bookshops and can be ordered onlineeither <I>via</I> O'Reilly & Associates.Sp.Vb 1\& http://www.oreilly.com/catalog/perldbi.Ve.Spor Amazon.Sp.Vb 1\& http://www.amazon.com/exec/obidos/ASIN/1565926994/dbi.Ve.IP "\fI\s-1POD\s0 documentation\fR" 4.IX Item "POD documentation"\&\fI\s-1POD\s0\fRs are chunks of documentation usually embedded within perl programsthat document the code ``\fIin place\fR'', providing a useful resource forprogrammers and users of modules. \s-1POD\s0 for \s-1DBI\s0 and drivers is beginning to become more commonplace, and documentation for these modules can be readwith the \f(CW\*(C`perldoc\*(C'\fR program included with Perl..RS 4.IP "The \s-1DBI\s0 Specification" 4.IX Item "The DBI Specification"The \s-1POD\s0 for the \s-1DBI\s0 Specification can be read with the:.Sp.Vb 1\& perldoc DBI.Ve.Spcommand. The Specification also forms Appendix A of \*(L"Programming the Perl\&\s-1DBI\s0\*(R".
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -