Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 551C9101B2 for ; Tue, 16 Jul 2013 20:11:49 +0000 (UTC) Received: (qmail 15601 invoked by uid 500); 16 Jul 2013 20:11:48 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 15565 invoked by uid 500); 16 Jul 2013 20:11:47 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 15557 invoked by uid 99); 16 Jul 2013 20:11:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jul 2013 20:11:47 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tim@alwaysreformed.com designates 74.55.86.74 as permitted sender) Received: from [74.55.86.74] (HELO smtp.webfaction.com) (74.55.86.74) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jul 2013 20:11:41 +0000 Received: from [192.168.1.3] (unknown [99.151.36.61]) by smtp.webfaction.com (Postfix) with ESMTP id 4C7D221BA724 for ; Tue, 16 Jul 2013 20:11:19 +0000 (UTC) Message-ID: <51E5A8E5.1000508@alwaysreformed.com> Date: Tue, 16 Jul 2013 15:11:17 -0500 From: Tim Black User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Re: Trying to wrap my head around CouchDB References: In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: multipart/alternative; boundary="------------070304070107080808040100" X-Virus-Checked: Checked by ClamAV on apache.org --------------070304070107080808040100 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Yves, These pages will help you with these questions: http://guide.couchdb.org/editions/1/en/views.html http://guide.couchdb.org/editions/1/en/lists.html http://guide.couchdb.org/editions/1/en/cookbook.html More specifically, On 07/16/2013 02:51 PM, Yves S. Garret wrote: > 1 - How is data represented in CouchDB as compared to MySQL? MySQL lets you define each table's schema in terms of what column names and types are found in each table, and what indexes optimize searching what columns in each table. > How can I > create (or visualize in > my head) multiple tuples of the same type of data (as in a table that has > columns of specific types > and then each entry is a row)? If I need to store multiple orders in a > system (where the data looks > roughly the same, how would that look? In CouchDB, there is no schema, so you have more options for how to structure your data, but a common way to mimic MySQL's tables in CouchDB is as follows: Each row of a MySQL table is one JSON document in CouchDB. Each document contains a "type" or "collection" (in backbone-couchdb, for instance) attribute, so one example document could be {"type":"order", "name":"Honda Accord", "amount":"10,000.00"}. You could make other documents which also contain the attribute "type":"order". All these "order" documents would be roughly equivalent to a table in MySQL named "order". To get all order documents in one request, write, then query, a view which only emits documents if (doc.type == 'order'). > 2 - How is binary data handled inside of CouchDB? As attachments to documents. > As in, how is data > stored inside of CouchDB > and then used (text and binary)? Attachments can be directly accessed at a URL under the URL for the document to which they are attached. Tim --------------070304070107080808040100--