couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Schmidt <>
Subject Re: Trying to wrap my head around CouchDB
Date Tue, 16 Jul 2013 22:06:13 GMT

> Ok.  Say in MySQL I have an orders table, a customers table and an 
> table (where the stuff that I want to sell is located).  How would this
> look like
> in CouchDB?
You put each customer, order and item into its own document.
> So you would have each customer, order and items document, but how 
> you differentiate between the 3 types of documents?
A common way to do that is to give each document a "type" attribute and 
then check for certain types in the views.
The guide is quite outdated, nevertheless the first chapters are very 
informative, good to read and still correct.

> I realize that this is not the same as MySQL, but I'm trying to find the
> relationships
> (and model them in my head) as to how I could do the same thing in 
Maybe you need some time to "unlearn" these SQL things. I find CouchDBs 
way of handling documents intuitive, maybe because I never really learned 
SQL ;)

  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message