2008/5/7 Guby <[EMAIL PROTECTED]>: > > > One step beyond, you could even say the document-map is a tree. Why > > even speak of documents and databases? > > Image access like this: > > > > GET couchserver/mydatabase/mydocument/pizzas/eaten > > > > To just get part of the document, or to update part of the document. > > Deleting all documents in the database: > > > > PUT couchserver/mydatabase > > > > {} > > > That is a really cool idea, but then, how do you get views to work? What do > you pass on to the views for indexing if you don't have a document entity?
Views could get an 'array' for each 'path' in the documents. Something like function(path, val) { if( path[0] == 'pizzas' && path.length == 2) map( path[1], val ); } Although there is not a flat collection of documents, but rather a tree of data, that doesn't mean that tree-nodes have no identitty. Since a map consists of keys van values. The path of keys is the unique identifer for the associated data. Greetings, Ralf