Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Not having experience with SQL limits my competence in answering, however I would like to observe that (1) you already appear to have a functional system and (2) at present, your data structures are not especially complicated.

I would be interested to know why what benefits a move to SQL will bring.

Right now, your data is stored in files that you read into perl data structures. You can write perl to get the entries that you want, to combine them, to print them, etc.

In the database approach, you will rewrite your scripts/applications to use SQL instead of perl to access your data. As you observe, you will write extra utilities to enter/update entries, replacing use of your text editor.

Although your editor may be trusty, every time you use it, you run the risk of editing entries by accident. That becomes a problem when you have many, many entries because an inadvertent mouse-click or keystroke could change an entry without your intention/awareness. A text editor has no protection against such randomness creeping in, although you could finesse the issue by using diff (or git-diff) to inspect your files' changes after each update.

If you've decided to changeover and managed to create a database with all your entries, the problem becomes how to rewrite your scripts with the least amount of pain. Probably you will modify them so that the data access part is contained in a few subroutines. You could even write tests to verify that these subroutines work properly. Later you can rewrite these subroutines to use the database instead of perl structures. When the tests pass, you know that everything (at least everything you test) performs as expected.

A large part of programming is changing code that already works into more beautiful/maintainable code that does that same thing. However, it is often practical to keep old, proven code.


In reply to Re: OT: SQL and me by gnosti
in thread OT: SQL and me by Lady_Aleena

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 avoiding work at the Monastery: (16)
    As of 2014-08-29 16:09 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (281 votes), past polls