incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Vincent Liwanag <>
Subject Referential Integrity with Unique IDs
Date Tue, 25 Aug 2009 14:21:03 GMT
Hi guys,

For some document type, I have some property 'x' which I'd like to be 
unique across all records. However, the value for this property may change.

The way I see it is that I have two options. If I derive the id from 
this property 'x', then I am assured of its uniqueness. However, I 
cannot easily change the value for property 'x', as the value of the id 
depends on it. Moreover, I may have to update all records which refers 
to it.

If I use a uuid however, referential integrity is retained. However, I'm 
not sure if CouchDB alone can make sure that the value for that property 
is unique.

Any thoughts on this?


JV Liwanag

View raw message