Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: SQLite and Storable: is "Text" okay?

by sundialsvc4 (Monsignor)
on Oct 06, 2010 at 17:59 UTC ( #863842=note: print w/ replies, xml ) Need Help??


in reply to SQLite and Storable: is "Text" okay?

Okay, it sounds like the developing consensus here, based in particular on what BrowserUK has observed, is that BLOB would be the most appropriate data type.

I, too, have read that “the storage format is based on the value itself,” and that notion has always given me pause...

Well, in any case, I surmise that the fundamental data-representation used by Storable is “binary data,” not “a string.”   (This in direct contrast to other choices like YAML and JSON, which are designed with the HTTP protocol in mind.)   Consequently, BLOB would presumably give SQLite the most-direct advice that “what you should expect to find in this column is... ‘arbitrary binary data.’”   Hence, BLOB, and not TEXT, becomes the most appropriate choice.

“Going once ... going twice ...”


Comment on Re: SQLite and Storable: is "Text" okay?
Re^2: SQLite and Storable: is "Text" okay?
by Your Mother (Canon) on Oct 06, 2010 at 19:08 UTC

    JSON::XS is as fast as Storable and is also human readable/editable. This can help with debugging; faster, easier, less error prone than writing new code to do the introspection/tweaking. Unless you're doing something special that needs more than JSON provides, I'd recommend it over Storable.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2014-07-12 15:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (240 votes), past polls