<?xml version="1.0" encoding="windows-1252"?>
<node id="1022057" title="Re: Best way to store object in db" created="2013-03-06 13:18:04" updated="2013-03-06 13:18:04">
<type id="11">
note</type>
<author id="616540">
moritz</author>
<data>
<field name="doctext">
&lt;p&gt;Just a few random thoughts:

&lt;ul&gt;
   &lt;li&gt;Storing objects as blobs in a database makes it (nearly) impossible to do useful searches in them. Since the power of SQL queries is the main selling point of relation database systems, that's really a pity, and you might want to consider other storage systems ("nosql")&lt;/li&gt;
   
   &lt;li&gt;If all your objects have similar structure, storing them in a proper schema would improve searchability&lt;/li&gt;
   &lt;li&gt;YAML doesn't capture all features of Perl 5 data structures (for example weak references).&lt;/li&gt;
   &lt;li&gt;Storable captures more features, but you'll generally have problems changing to a different version of Storable (or Perl, for that matter).&lt;/li&gt;
   &lt;li&gt;If you plan to support multiple serialization formats, store the format in addition to the actual data.&lt;/li&gt;
&lt;/ul&gt;

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-616540"&gt;
[http://perl6.org/|Perl 6 - the future is here, just unevenly distributed]
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1022037</field>
<field name="parent_node">
1022037</field>
</data>
</node>
