Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

Using XML for broad, general databases doesn't make much sense, no. It's just another wheel being reinvented - in a fairly awkward way, too.

I can see it helping in narrow contexts, however. If your application only needs to store a particular kind of data, then a full-tilt relational database might be a little bit of overkill. The FAQ generation that was mentioned before is a perfect example. On my own, I've used XML to store configuration details for a meta-search tool, news items for a small site, and even a simple guestbook CGI.

I prefer XML over CSV because of structure issues. I am a geek of Very Small Brain, and I like it when my data storage is self-documenting. Of course I document my own CSV files every time - it would be wrong not to :-) But there have been too many times where I examine a client's data files and find:

  • No documentation ("The 3rd column says 'yes'. 'yes' to what?)
  • Profoundly arcane documentation (Ah, the third column is for 'DO4'. Uh ... what?)

You can still find bad or no documentation in an XML file, but generally I've had good luck coming across clearly named tags. Even in the worst cases, I've been able to figure out quite a bit from the structure of the markup. (I'm not sure what 'DO4' is, but it doesn't have anything to do with the address, because that's way over in this other element.)

Of course, if your project has a lot of data with intricate relations that needs to scale way waay up, then you're back to relational databases. XML is convenient for data storage, yes, but it is not the best tool in all cases.

So yeah - XML as a database for small, very specific sets makes sense to me. And yes - the world is nutz.


"All you need is ignorance and confidence; then success is sure."-- Mark Twain

In reply to Re: XML for databases?!?! Is it just me or is the rest of the world nutz? by webfiend
in thread XML for databases?!?! Is it just me or is the rest of the world nutz? by S_Shrum

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 browsing the Monastery: (6)
    As of 2014-08-29 00:08 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (275 votes), past polls