On Wed, Dec 17, 2008 at 3:07 AM, Kerr Rainey <[email protected]> wrote: > 2008/12/17 Andrea Schiavini <[email protected]>: >> In the second approach described in this article, posts are separated from >> comments. But isn't this in contrast with the impossibility of CouchDB to >> update atomically several documents? It could lead to a loss of database >> integrity, if in example an user deletes an article while another one >> updates a related comment. Shouldn't it be encouraged to keep related >> informations in the same document? > > If you need / want to maintain consistency at all times in the > database you can't do it with CouchDB.
Just to clear up any misconceptions: all the updates in a _bulk_docs request succeed or fail atomically. So as long as you're working on a single node, it is possible to ensure consistency while eg: changing a user's link url across a selection of blog posts. -- Chris Anderson http://jchris.mfdz.com
