I'm in the process of writing a CGI that will display data for a given thing. Now, there are 5 categories of thing and about 200 in each category. A thing has about 10 attributes, and those attributes are always the same at any given time, but it's very likely what those attributes are will change every 3-4 months. (Not my choice.) However, the number of things isn't going to increase very much. Maybe to 300 in 6 categories.

Now, I've got to figure out what the underlying data structure is going to be. Before people give a knee-jerk response of "Just use MySQL/Oracle/other RDBMS", please read further.

I'm not going to be maintaining this thing. In fact, it's very likely that someone with no understanding of RDBMS's, but some understanding of Perl/CGI, will be the one handed this. That person will be responsible for making changes to the attributes of the things in the future. This CGI will probably live for about 10 years (or so), but has to be as low maintenance as possible.

I'd like to avoid using an RDBMS, if possible, primarily due to two reasons:

  1. The relatively small number of data points
  2. The fact that the data is highly UN-normalized
#2 is important, because it means that whoever takes this over needs to understand RDBMS's and normalization to correctly update the DB for changes in the thing attributes.

So, what I'm finally getting at is this - is there a way I can have this data in some process just sitting out there that another CGI process can query? I don't want to have to do a file containing all the data every time I want to get at one data point. It'd be really nice to have all that data in memory (as it only is updated once per day in a batch process I will be writing) and not have to re-create it every time a CGI submit button is pushed.

Any thoughts?

Oh - I have been given enough time to implement the correct solution, which is a rather nice luxury. So, time is not a (major) concern.


In reply to CGI and static data... by dragonchild

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.