You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Mark Hammond <sk...@gmail.com> on 2009/11/16 05:24:56 UTC
Re: Storing Hierarchical Data
On 16/11/2009 2:14 PM, Andreas Pavlogiannis wrote:
> * Each file is represented by a single document that has a "path"
> attribute that indicates the directory that is being stored to. This
> gives the advantage of avoiding conventional pathname translation and
> retrieving the correct document immediately.
This sounds like the sanest approach. Storing the path as a list would
give a nice interface to the view engine for locating all items in a
"folder", etc.
> However, operations such as
> renaming a folder require updating many documents and should be avoided.
This just might have to be the price you pay. A "rename" operation
can't really be made atomic, especially in the face of clustering,
replication etc.
HTH,
Mark