incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <>
Subject Re: couchdb data structure
Date Wed, 20 Nov 2013 19:18:42 GMT

On Nov 19, 2013, at 2:28 AM, John Norris <<>>

But in couchdb, a database is a number of documents? And those documents
can represent several object types? So do I need each document to have a
field representing what type it is? (eg a field that is unique to that
document type).

Yes. The convention is a property called “type” whose value is a string identifying that
type of document. The type names generally just need to be unique within your database.

Or does each document type go in its own database?

No. There’s almost never a need to split an app into multiple databases.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message