⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 faq.pm

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 PM
📖 第 1 页 / 共 3 页
字号:
drivers or whether a driver is not fully compliant with the DBI Specification.=item I<Rambles, Tidbits and Observations>    http://dbi.perl.org/tidbits    http://www.symbolstone.org/technology/perl/DBI/tidbitsThere are a series of occasional rambles from various people on theDBI mailing lists who, in an attempt to clear up a simple point, end updrafting fairly comprehensive documents. These are quite often varying inquality, but do provide some insights into the workings of the interfaces.=item I<Articles>A list of articles discussing the DBI can be found on the DBI WWW page at:    http://dbi.perl.org/    http://www.symbolstone.org/technology/perl/DBIThese articles are of varying quality and age, from the original Perl Journalarticle written by Alligator and Tim, to more recent debacles published onlinefrom about.com.=item I<README files>The I<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. Thesecan all be read from the main DBI WWW page at:    http://dbi.perl.org/    http://www.symbolstone.org/technology/perl/DBI=item I<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=item I<Mailing List Archives>=over 4=item I<US Mailing List Archives>    http://outside.organic.com/mail-archives/dbi-users/Searchable hypermail archives of the three mailing lists, and some of themuch older traffic have been set up for users to browse.=item I<European Mailing List Archives>    http://www.rosat.mpe-garching.mpg.de/mailing-lists/PerlDB-InterestAs per the US archive above.=back=back=head1 Compilation Problems=head2 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 READMEfiles for each driver in advance online at:    http://dbi.perl.org/    http://www.symbolstone.org/technology/perl/DBIIf it's a known problem, you'll probably have to wait till it gets fixed. If you're I<really> needing it fixed, try the following:=over 4=item I<Attempt to fix it yourself>This technique is generally I<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:=over 4=item *What the problem was, and test cases, if possible.=item *What you needed to do to fix it. Please make sure you mention everything.=item *Platform information, database version, perl version, module version and DBI version.=back=item I<Email the author> Do I<NOT> whinge!Please email the address listed in the WWW pages for whichever driver youare having problems with. Do I<not> directly email the author at aknown address unless it corresponds with the one listed.We tend to have real jobs to do, and we do read the mailing lists forproblems. Besides, we may not have access to <I<insert yourfavourite brain-damaged platform here>> and couldn't be of anyassistance 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'redoing this sort of stuff anyway, and get a patch within 5 minutes. Theatmosphere in the DBI circle is that we I<do> appreciate the users'problems, since we work in similar environments.If you are planning to email the author, please furnish as much informationas possible, I<ie>:=over 4=item *I<ALL> the information asked for in the README file inthe problematic module. And we mean I<ALL> of it. We don'tput lines like that in documentation for the good of our health, orto meet obscure README file standards of length.=item *If you have a core dump, try the I<Devel::CoreStack> module forgenerating a stack trace from the core dump. Send us that too.I<Devel::CoreStack> can be found on CPAN at:    http://www.perl.com/cgi-bin/cpan_mod?module=Devel::CoreStack=item *Module versions, perl version, test cases, operating system versionsand I<any other pertinent information>.=backRemember, 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, specificallyrequest that you do I<not> mail them directly. Please respect their wishes anduse the email addresses listed in the appropriate module C<README> file.=item I<Email the dbi-users Mailing List>It's usually a fairly intelligent idea to I<cc> the mailing listanyway with problems. The authors all read the lists, so you lose nothingby mailing there.=back=head1 Platform and Driver Issues=head2 3.1 What's the difference between ODBC and DBI?In terms of architecture - not much: Both define programminginterfaces. Both allow multiple drivers to be loaded to do theactual work.In terms of ease of use - much: The DBI is a 'high level' interfacethat, like Perl itself, strives to make the simple things easy whilestill 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 thedifference" question is more usefully rephrased as:Chapter 7 of "Programming the Perl DBI" covers this topic in far moredetail and should be consulted.=head2 3.2 What's the difference between Win32::ODBC and DBD::ODBC?The DBI, and thus DBD::ODBC, has a different philosophy from theWin32::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 parameterbinding and multiple prepared statements which reduces the load onthe 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 thePerl 5.004 binary distribution for Win32 (they don't work with theolder, non-standard, ActiveState port).Scripts written with the DBI and DBD::ODBC are faster than Win32::ODBCon Win32 and are trivially portable to other supported database types.The DBI offers optional automatic printing or die()ing on errors whichmakes 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 needaccess to more of the ODBC API than the DBI gives you. Otherwise, theDBI and DBD::ODBC combination may be your best bet.Chapter 7 of "Programming the Perl DBI" covers this topic in far moredetail and should be consulted.=head2 3.3 Is DBI supported under Windows 95 / NT platforms?Finally, yes! Jeff Urlwin has been working diligently on buildingI<DBI> and I<DBD::ODBC> under these platforms, and, with theadvent of a stabler perl and a port of I<MakeMaker>, the project hascome on by great leaps and bounds.The I<DBI> and I<DBD::Oracle> Win32 ports are now a standard part of DBI,so, downloading I<DBI> of version higher than I<0.81> should work fine as should using the most recent I<DBD::Oracle> version.=head2 3.4 Can I access Microsoft Access or SQL-Server databases with DBI?Yes, use the I<DBD::ODBC> driver.=head2 3.5 Is the a DBD for <I<insert favourite database here>>?Is is listed on the DBI drivers page?    http://dbi.perl.org/    http://www.symbolstone.org/technology/perl/DBIIf not, no. A complete absence of a given database driver from thatpage means that no-one has announced any intention to work on it, not thatsuch a driver is impossible to write.A corollary of the above statement implies that if you see an announcementfor a driver I<not> on the above page, there's a good chance it's notactually a I<DBI> driver, and may not conform to the specifications. Therefore,questions concerning problems with that code should I<not> really be addressedto the DBI Mailing Lists.=head2 3.6 What's DBM? And why should I use DBI instead?Extracted from ``I<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-onlydatabases, or small and simple datasets. However, for more scaleable dataset handling, not to mention robust transactional locking, users are recommended to use a more powerful database engine I<via> I<DBI>.Chapter 2 of "Programming the Perl DBI" discusses DBM files in detail.=head2 3.7 What database do you recommend me using?This is a particularly thorny area in which an objective answer is difficultto come by, since each dataset, proposed usage and system configurationdiffers from person to person.From the current author's point of view, if the dataset is relativelysmall, being tables of less than 1 million rows, and less than 1000 tablesin a given database, then I<mSQL> is a perfectly acceptable solutionto your problem. This database is extremely cheap, is wonderfully robustand has excellent support. More information is available on the HughesTechnology WWW site at:    http://www.hughes.com.auYou may also wish to look at MySQL which is a more powerful database enginethat has a similar feel to mSQL.    http://www.tcx.seIf the dataset is larger than 1 million row tables or 1000 tables, or if youhave either more money, or larger machines, I would recommend I<Oracle RDBMS>.Oracle's WWW site is an excellent source of more information.    http://www.oracle.comI<Informix> is another high-end RDBMS that is worth considering. There areseveral differences between Oracle and Informix which are too complex forthis document to detail. Information on Informix can be found on theirWWW site at:    http://www.informix.comIn the case of WWW fronted applications, I<mSQL> may be a better optiondue to slow connection times between a CGI script and the Oracle RDBMS and

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -