I guess you can think of 3 kinds of ID’s that refer to some piece of data:
- Non-versioned: person-23
- Versioned: person-23-rev8
- Content addressable: d670460b4b4aece5915caf5c68d12f560a9fe3e4.
Both #2 and #3 are referencing something that, in theory, never changes, a snapshot. #3 just makes that more guaranteed. We mostly just talking about a hash of the content.
One other huge difference (assuming noms is like git): Person-23-rev8 is a reference to a document (assuming something like CouchDB) whereas d670460b4b4aece5915caf5c68d12f560a9fe3e4 is reference to an entire DB. It represents a snapshot of the entire db at any given time. Thus, a you also have the ability (as a side effect) to reference a snapshot of any subset of the DB:
Imaging your customer reported a bug in a database app. They could send you:
- the error message
- what they were doing at the time
- and a hash, representing the db state, exactly as it was when the problem occurred.
How cool is that!