I was wondering about specifying id's in CouchDB. For example:

House - Rooms -- Kitchen -- Living room -- ... - Windows - Doors

There are some documents, like "House", where there is and will only be one document of this type. Should I specify the id "house" for this document for quick access or rather use a generated id?

1 Answer 1


It's best not to use the name of a "type" as an id - it is better to use generated id's and have a key called "type" in each document where you have a string value of "Home" etc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.