...and I don't need the benefits of a relational db particularly.

But what you're describing is specifically a set of needs met by the benefits of a relational DB.

I third or fourth the suggestion for DBD::SQLite. It is an excellent solution for a lightweight database which provides the features (and benefits) that will meet the needs you've outlined in your post. Plus, it's self-contained; install the module, install DBI, and write a little script to convert your existing flat file to a SQLite database. Then modify your main script to use DBI instead of flat file lookups, and you're done. The actual database will consist of a single file. And you don't have to install all sorts of heavyweight database software. Performance is very good. Indexed lookups are fast. It sounds to me like an ideal solution for the criteria you've defined.


Dave


In reply to Re: Large Constant Database in Text File by davido
in thread Large Constant Database in Text File by stephentyler

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.