CouchDB is an open-source database designed for “multi-master replication”—i.e. multiple clients can modify the database and sync later, enabling offline software. It’s managed by the Apache Foundation.
CouchDB is implemented in Erlang, but PouchDB is a Javascript implementation designed to run on the browser.
The Ink and Switch authors suggest that it has the following serious issues:
Documents can have “attachments,” which are serialized as base64 or blobs depending on backend.
It’s a flat key/value store, like LevelDB. You can use structured key IDs to create hierarchy (e.g. see DocURI)
PouchDB-server
with a Firebase LevelDOWN backend to host it on Firestore… maybe?A clever way to handle “parent-child” document arrangements is to structure the keys so that the whole set can be fetched as a range: e.g. parent
, parent:child1
, parent:child2
, etc. Now you can query from parent
to parent:\ufff0
You can “join” by including IDs as part of the emitted value in mapping functions like {_id: someOtherID}
. Then when include_docs
is set to true
, the other document will be inserted.