couchdb

Couchdb conflict resolution

How does CouchDB handles conflicts while doing bi-directional replication? For example: Lets say there are two address book databases (in server A and B). There is a document for Jack which contains contact details of Jack. Server A and B are replicated and both have the same version of Jack document. In server A, Jack's mobile no is ...

Caching Authentication Data

Hi, I'm currently implementing a REST web service using CouchDB and RESTlet. The RESTlet layer is mainly for authentication and some minor filtering of the JSON data served by CouchDB: Clients <= HTTP => [ RESTlet <= HTTP => CouchDB ] I'm using CouchDB also to store user login data, because I don't want to add an additional database ...

Question about Non-Relational Databases (NoSQL)

Although I've not yet used any of the new NoSQL databases I've tried to keep myself informed by reading Wikipedia articles, blogs and the peeking into some of the NoSQL DBs documentation. I've just (re)read the August 2009 edition of php|architect, specifically the article about the Non-Relation Databases and a few questions popped up i...

How to use the lib section of a Design Document in CouchDB 0.11

I want to add some custom javascript functions to my design document, I can't find any examples of how to actually add these functions to the "lib" section of a design document. Can someone show me an example of how to add a function definition to the "lib" section? Follow up: I started using couchapp to manage my design documents and ...

Delete document with an empty ID

Hello, I have a CouchDB database in production. One of the documents has been edited (in Futon by an other developer). And it's lost it's ID (don't ask me how he did it). So now the document's id is an empty string, which makes it impossible to edit or delete via Futon. Is there a way I could hack into CouchDB to delete that document a...

What data is actually stored in a B-tree database in CouchDB?

I'm wondering what is actually stored in a CouchDB database B-tree? The CouchDB: The Definitive Guide tells that a database B-tree is used for append-only operations and that a database is stored in a single B-tree (besides per-view B-trees). So I guess the data items that are appended to the database file are revisions of documents, no...

NoSQL DB for .Net document-based database (ECM)

I'm halfway through coding a basic multi-tenant SaaS ECM solution. Each client has it's own instance of the database / datastore, but the .Net app is single instance. The documents are pretty much read only (i.e. an image archive of tiffs or PDFs) I've used MSSQL so far, but then started thinking this might be viable in a NoSQL DB (e.g....

Retrieve documents from CouchDB based on unique field

How can I retrieve document from CouchDB based on its field, not by ID? The problem is, documents in my system should have numeric IDs, so I add a field called doc_id to saved documents. Native CouchDB ids are too long for me. How can I retrieve document with doc_id = 10, for example? ...

Adding custom views using couch_potato and simply_stored ?

Hello, I'm building a rails app above couchdb and decided to try the couch_potato and simply_stored gems as they seem add a nice feature set above the rest api and put the couchdb development 'on the rails'. From what I can see SimlyStored/Couch works above the couch_potato layer, so from my understanding, the basic couch_potato featur...

Standalone Attachments in CouchDB + Ruby

Has anybody succeeded in sending standalone attachments using the standalone attachment API (if possible gziped) to couchDB from ruby? I know there are a few CURL examples, but my tries with Typhoeus haven't been successful so far. It usually just stops and waits for > 1 minute after the first few documents. CouchRest doesn't seem to sup...

B+ tree node sizing

I'm planning on writing a simple key/value store with a file architecture similar to CouchDB, i.e. an append-only b+tree. I've read everything I can find on B+trees and also everything I can find on CouchDB's internals, but I haven't had time to work my way through the source code (being in a very different language makes it a special p...

What are the major new features of CouchDB 0.11

What are the features worth learning in the 0.11 release of CouchDB? What resources are there to learn about these new developments? ...

Best document format for addressbook in CouchDB

Hi guys. I really tried, tried so hard but i cant understand couchdb :( I must record the contact of several people, should i put every contact in a single document ? "1th documet" { "names" : [ Jake", "Lock" ] "numbers" : [ "Jake's number", "Lock's number" ] } Future records: "1th documet" { "names" : [ Jake", "Lock", "K...

How do the readers fields should work like?

In release notes of CouchDB 0.11 is stated, that it supports readers fields. I guess it should work similary as in Lotus Notes. But unfortunately I cant find any documentation on this topic. Can someone point me to documentation or some brief explanation at least? Thank you David ...

UUIDs in CouchDB

I am wondering about the format UUIDs are by default represented in CouchDB. While the RFC 4122 describes UUIDs like 550e8400-e29b-11d4-a716-446655440000, CouchDB uses continuously chars like 3069197232055d39bc5bc39348a36417. I've searched some time in both their wiki and their documentation what this actually is, however without any res...

key sorting and mapreduce in couchdb

Hi all, I am making reduce view for counting users notes for date range and I am in front of quite not-solving problem. Date range select is ok - I create array key [YYYY,MM,DD,user_id]. Document example: { "_id": "1", "_rev": "1-84d3fa5f259c7b30c74028ca60a45f91", "body": "note text", "user_id": 666, "created_at": "Thu A...

Is it really wrong to version documents using CouchDB's default behaviour?

This is one of those "I know I shouldn't do this but it's oh so convenient." questions. Sorry about that. I plan to use CouchDB for storing a bunch of documents and keeping their entire revision history. CouchDB does the versioning automatically, but it is strongly discouraged for programmer's use: "You cannot rely on document revis...

Clojure and NoSQL databases

I am currently trying to pick between different NoSQL databases for my project. The project is being written in clojure and javascript. I am currently looking at three candidates for storage. What are the relative strengths and weaknesses of MongoDB, FleetDB and CouchDB? Which one is better supported in Clojure? Which one is better suppo...

Delete field using curl in couchdb

Hi guys. I searched and didn't found, can I delete a field of a couchdb's document using curl ? The most I can do is delete a document :( curl -X DELETE http://localhost:5984/users/jack?rev=1-cee2abbbe4afefa9b3b5db10260c0c94 Thanks. ...

How do you get a list of all the _design documents for a given database in CouchDB?

I have searched all over and can't figure out how to get a list of all the design documents for a specific database in CouchDB? ...