Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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

by sundialsvc4 (Abbot)
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?

Replies are listed 'Best First'.
Re^2: SQLite and Storable: is "Text" okay?
by Your Mother (Chancellor) 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://863842]
and the shadows deepen...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2017-12-17 09:15 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (462 votes). Check out past polls.