Yeah, relational databases have a lot more data integrity checks and constraints. For CouchDB I'm unaware of any unique constraints provided by the database except for the _id attribute.
Do the timestamps get updated frequently for a document? Is it a concern that the _id changes? Would it not work to just keep inserting the new documents instead of updating old ones? Does the data have to be always consistent or can it be eventually consistent? Perhaps you just keep inserting the documents with a _changes feed listener running to resolve these "conflicts" in your data integrity. If you truly want CouchDB to do the check for you then you'll have to shove what you want into the _id attribute. This doesn't sound like a bad idea if that is truly what gives you a unique chuck of data. On Thu, Oct 20, 2011 at 9:12 AM, Alexander Uvarov < [email protected]> wrote: > This is not a problem in RDBMS with transactions and constraints. Am I > missing something? > > On Thu, Oct 20, 2011 at 6:48 PM, CGS <[email protected]> wrote: > > Hi Patrick, > > > > I suppose that is more of logic than the tool itself and I suppose you > may > > enter the same problem in any DB you may change to (SQL or no-SQL). > -- “The limits of language are the limits of one's world. “ - Ludwig von Wittgenstein "Water is fluid, soft and yielding. But water will wear away rock, which is rigid and cannot yield. As a rule, whatever is fluid, soft and yielding will overcome whatever is rigid and hard. This is another paradox: what is soft is strong." - Lao-Tzu
