couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilya Sterin <ster...@gmail.com>
Subject Re: Storing Hierarchical Data
Date Mon, 16 Nov 2009 06:12:00 GMT
I actually am using CouchDB for storing hierarchical filesystem-like
data.  A good way of thinking about it is the same as amazon s3.  It's
really a key/value store, but hierarchy is inferred by key names.

One food for thought is, if say you create keys to contain the full
name and then infer the names based on the path, /some/path/to/file
...  You can then use views to get a consistent view of the directory.
 So basically files are documents, directories are views.  Deleting
files is just a matter of deleting that document, since views are not
materialized, it will reflect point in time contents.  Also if the
directory content is highly volatile, you might run into issues of
having orphaned views, which (since I believe they are indexed) use up
unnecessary space.  You can have some background process clean up
orphaned directory views, if you actually want to remove them.

Ilya

Mime
View raw message