Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

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!
  • 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
  • Outside of code tags, you may need to use entities for some characters:
            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?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others having an uproarious good time at the Monastery: (7)
    As of 2014-09-15 03:16 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite cookbook is:










      Results (145 votes), past polls