Storable or Sereal was the 1st thing that came to my mind but then I realised that they do not allow for searching individual fields (e.g. select) while in-store. You have to read them back into memory and do that there. Additionally, when you want to insert a new record with references or referred by already existing record you need to read all back in memory, add the record, and store. So, (as Choroba said on CB:) "it's hard to make guesses without a detailed spec or use cases." I will add that each solution comes at a price.

OTOH I completely understand your "frustration" that there is no simpler way than creating tables especially to represent complex and nested data structures. But perhaps NoSQL is what you are looking for, see MongoDB::Tutorial. And there are all sort of modules which abstract the tedious parts of SQL away. e.g. DBIx::Class and SQL::Abstract - I am just mentioning those as further reading. I am no way near an expert for these. Other Monks are.

bw, bliako


In reply to Re: Persistent data structures -- why so complicated? by bliako
in thread Persistent data structures -- why so complicated? by davebaker

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.