Location: Web Unconventions

Discussion: CouchDb QuestionReported This is a featured thread

Showing 1 post
rrees
rrees
CouchDb Question
Jun 6 2009, 9:17 AM EDT | Post edited: Jun 6 2009, 9:17 AM EDT
During the evening I answered a question saying that you can query historic revisions of documents in Couch. This answer was the right one, the map-reduce is done over the latest revisions of documents.

A more detailed explanation of dealing with historic revisions will be appearing in the CouchDb wiki but for now the brief answer is that if the data is relevant you should store it under a different key in the document (for example Surname and Maiden Name), taking advantage of the schema-less nature of the data or you should separate the historic data into another document and then link via the id of the document representing the previous information. This would then allow you to work back to the main document. For example for addresses you could store each person's address in a different document and then have an array field in the main document that holds the ids of previous addresses in historic order.

You can go to the CouchDb IRC channel to discuss the issue in more detail.
Do you find this valuable?    
Keyword tags: None

Sign in to be the first to reply.