-
Notifications
You must be signed in to change notification settings - Fork 1
Data Model
TOGoS edited this page Sep 13, 2010
·
5 revisions
ContentCouch models trees of data of the following types:
- Directory – a mapping of names to directory entries (which are each a pointer to some other object and some metadata)
- Blob – a specific sequence of bytes
- Commit – a pointer to some other object along with some metadata such as author, creation time, a comment, and previous commits. These are useful for tracking revision history of a file or directory.
A core principle of ContentCouch is that anything we care to deal with can be identified with a URI. To address blobs, ContentCouch uses SHA-1 URNs, like so:
urn:sha1:ZZZM7CV24GRYUNZFONLZP3RFVZ2MFJTX.
Since it is not possibe to directly take the SHA-1 sum of anything but a byte sequence, directories and commits cannot be directly referenced by these URNs. To identify these other objects, ContentCouch serializes them as RDF and references them in their serialized form. To differentiate between the serialized form and the object it represents, the URI is prefixed with “x-parse-rdf:
”. A directory can then be referenced like so:
x-parse-rdf:urn:sha1:PXETKGHMCNILW5OHYBHEYZROGJWASKEB.