incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hammond <skippy.hamm...@gmail.com>
Subject Re: Storing Hierarchical Data
Date Mon, 16 Nov 2009 04:24:56 GMT
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

Mime
View raw message