in reply to storing tree-like structures in tables

i could maybe store serialized objects or xml in my database, but really rather wouldn't because i need speed and portability.

Serializing a tree and storing it in a BLOB (Binary Large OBject) field is a lot faster than decomposing the tree into separate nodes and storing each (and then having to issue a bunch of SELECTs to reconstitute the tree).

If you're using MySQL and Perl, portability shouldn't be an issue. The only issue is which method you use to serialize objects. See storing serialized object in a database for an earlier discussion of alternatives.

  • Comment on Re: storing tree-like structures in tables