Crikey - reading those replies made my eyes hurt.

Points:
1. GDBM_File is *really* easy. If you're just using a glorified hash, you just tie() it to a disk file and it bgehaves exactly like a normal hash. Large-ish files (in comparison to flat files) but simple, faster and hacky.

2. SQL is also really easy. Learning more about relational databases will look good on your CV. MySQL is free, but unless you host the site you'll need to find a host who runs it. If it's a standalone program then you require the users to install MySQL and the DBD/DBI interfaces, then run a setup script to check the db is set up OK, install the tables etc etc.

My advice? Depends on how much time you have. If you have the time and desire to learn some SQL, do it - it crops up everywhere these days, and it really is easy as (insert easy thing here). Otherwise, just use GDBM_File. It sounds like it will be painless to implement, and it is stupendously easy.

One more point - ignore that complicated JOIN stuff above, just keep it simple like the first example and your program will work. Yes, it can be optimised further, but hey, it's easy to maintain, and the difference is bound to be negligible. The first example is readable to someone who doesn't know SQL, the second isn't. Go figure.

Adam
adam@sixzeds.com


In reply to Re: DBI vs MLDBM/GDBM_File by Anonymous Monk
in thread DBI vs MLDBM/GDBM_File, etc. by ZZamboni

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.