Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I have a program that processes emails and extracts info from them. I have been storing all the config info, and the log of actions (datetime, info about the emails, success of processing, total number of messages processed, etc.) in text files thus far. Works mostly fine.

I have been refining this work, and am considering moving all of the above to a more structured db. The first obvious answer is SQLite... everything self- contained, blah blah. However, I have been trying Bdb (using just DB_File). Works fine with the little mods I have made thus far, e.g., moving the config info from the text file to a file-based hash.

I've also built a web-based interface to set the config values, but eventually I would build one to also monitor the progress of the program. The kind of questions that I would like answered would be --

config params: hash total number of messages processed: int total number of messages processed today: int total number of messages processed in this run: int total number of messages processed between ? and ?: int started program on: datetime action record: array of hashes

I seek the following wisdom: is Bdb a good or even a possible tool here?

On a related note -- I find the whole concept of Bdb very fascinating. Perhaps because it is a novelty to me after years of getting bored by rdbms and SQL. However, I find little or no discussion of using Bdb as the backend of websites. The reasons seem obvious -- Bdb is not relational, and while some relational stuff can be emulated, well, heck, it was just not designed to answer the kind of questions a rdbms can. Still, there is something elegant about everything being contained in a hash that can be loaded in memory, all self-contained, clean... like a single, shiny object.

Any insights?

In reply to Wisdom sought on migrating from text files to Berkeley DB or SQL by punkish

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (4)
    As of 2018-06-23 22:21 GMT
    Find Nodes?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?

      Results (126 votes). Check out past polls.