Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Persistent data structures -- why so complicated?

by bliako (Monsignor)
on Mar 12, 2021 at 11:20 UTC ( [id://11129495]=note: print w/replies, xml ) Need Help??


in reply to Persistent data structures -- why so complicated?

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11129495]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-18 23:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found