There are really at least two questions - what database backend are you going to use for storage and what programming method are you going to use to access it. In terms of the access method, unquestionably perl's DBI is the most powerful, flexible, and most widely tested and supported. Within DBI you have the option of using SQL or of using various wrappers to DBI that provide more perl-like methods of access. If you intend to do much with databases in the future, you're best off learning at least some SQL.

In terms of the storage mechanism, unless you have previous database experience or have complex or large (hundreds of megabytes) datasets, almost anything will do as a first database - all of the basic operations of DBI are available with even the simplest of backends and whatever you learn will pretty much work the same way if and when you change your backend.

If you already know enough about databases to know about things like transactions and constraints, you'll want a full featured backend like postgreSQL or MySQL accessed through DBI's DBD::Pg and DBD::mysql. PostgreSQL is currently more powerful, and MySQL is currently easier but both those evaluations are changing as both are in constant development. With both of those, you'll need to install a database server.

If you are just starting with databases, you my wish to choose a simpler backend that does not require separate server installation. DBI provides DBD::SQLite, DBD::DBM (which provides a DBI interface to the DBM files you mentioned), DBD::CSV, and DBD::AnyData, DBD::XBase which can all be run without a separate database server and are extremely easy to install. DBD::SQLite and DBD::DBM are faster, DBD::CSV and DBD::AnyData have the ability to store data in human readable files (CSV, fixed-length,XML,etc.), DBD::XBase has the advantage of working with a variety of legacy formats.

Good luck!


In reply to Re: best database by jZed
in thread best database by TooNewbie

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.