PouchDB structure-open source projects pouchdb/pouchdb

llabball

… does it mean that i need to create multiple databases?

No.

… a document mean a row in sql or am i misunderstood?

That’s right. The SQL table defines column header (name and type) – that are the JSON property names of the doc.

So, all docs (rows) with the same properties (a so called “schema”) are the equivalent of your SQL table. You can have as much different schemata in one database as you want (visit json-schema.org for some inspiration).

How to request them separately? Create CouchDB views! You can get all/some “rows” of your tabular data (docs with the same schema) with one request as you know it from SQL.

To write such views easily the property type is very common for CouchDB docs. Your known name from a SQL table can be your type like doc.type: "animal"

Your view names will be maybe animalByName or animalByWeight. Depends on your needs.