In CouchDB, this is pretty simple. Each item in the database has _id and _rev. Therefore, you do not need a separate version number. Then I would do it. Assign a system number to each element. This number will be a link to another database record containing the date, comment and user for this revision.
Examples:
tracked by:
{ _id: "1231223klkj123", _rev: "4-1231223klkj123", systemRev: "192hjk8fhkj123", foo: "bar", fooarray: ["bar1", "bar2", bar3"] }
Then create a separate entry:
{ _id: "192hjk8fhkj123", _rev: "2-192hjk8fhkj123", user: "John", comment: "What I did yesterday", date: "1/1/2010", tags: ["C# edits", "bug fixes"] }
It seems to me pretty elegant ....
Timothy baldridge
source share