Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 7566 invoked from network); 26 Aug 2010 01:55:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Aug 2010 01:55:05 -0000 Received: (qmail 8559 invoked by uid 500); 26 Aug 2010 01:55:04 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 8506 invoked by uid 500); 26 Aug 2010 01:55:03 -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 8498 invoked by uid 99); 26 Aug 2010 01:55:03 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Aug 2010 01:55:03 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mhebel@gmail.com designates 209.85.212.52 as permitted sender) Received: from [209.85.212.52] (HELO mail-vw0-f52.google.com) (209.85.212.52) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Aug 2010 01:54:56 +0000 Received: by vws14 with SMTP id 14so1726358vws.11 for ; Wed, 25 Aug 2010 18:54:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=2ddhBZh4f48Y+MKQLNpzRhDK4U8NQ2naLptoy+5gnMQ=; b=mTd00uEuRHehIx9tYmpl9mUTN0WgIqo+Yu3DWFOaNuyn5vwhGKPFWZ+4Sft+603Cn4 f81hcXIFmK0794TKJMoIGFyBjX1UXmf9pxqKhJk375xEnAwFca9VxzSHIs35L8JCSxD1 UiR62IwnQxWcXypugpU48Rw3AnfS2j6+fobWA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Wr+kMU7E9nfai+SgB9A/CmS6vWcuWHhMXrpbyBIBaNEsY+fYWXud6x3Y7TgCYZ56Cy hgRNaiXu1L/huMQ3t8iVXIyeOd3cOM+1cGHUbisn9cKZ9tfEBKo7NE3b93aatI2oYueD 7QmsE/IkbduGCEr7WP7QODiwbbso80FbpeiMs= MIME-Version: 1.0 Received: by 10.220.49.202 with SMTP id w10mr5881904vcf.70.1282787675424; Wed, 25 Aug 2010 18:54:35 -0700 (PDT) Received: by 10.220.16.81 with HTTP; Wed, 25 Aug 2010 18:54:35 -0700 (PDT) Date: Wed, 25 Aug 2010 21:54:35 -0400 Message-ID: Subject: how to handle multiple where clauses? From: matt hebel To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0016e6476634b74931048eb0473d X-Virus-Checked: Checked by ClamAV on apache.org --0016e6476634b74931048eb0473d Content-Type: text/plain; charset=ISO-8859-1 Hello, my data is kind of unique and it will work best if i use couchDB to store and retrieve the data but I'm having a hard time getting out what I need. a document looks like this. { "_id": "7d33b72f256fae4615dcea99cd7a2239", "_rev": "1-587b7a9811db08f8abf925bc44a23bb9", "term": "A", "course_code": "1011", "course_title": "Internet: Behind the Curtain", "subject": "COMPSCI", "section": "002", "type": "LEC", "class_number": 31912, "building_room": "MC-105B", "Instructor": "Andrews", "full": false, "time": [ { "day": "W", "start": 1230, "end": 1330 }, { "day": "T", "start": 1230, "end": 1330 } ], "days": { "M": { "s": 1230, "e": 1330 }, "Tu": { }, "W": { "s": 1430, "e": 1530 }, "Thu": { }, "F": { } } } Where I'm having problems is getting out the sections that belong together. I need to know that its from subject, term,course_code. If that data is not provided i will end up with a mess of data that do not relate because there are courses with course code 1011 in other subjects. Therefor make it unique i need the subject, term, and course code. Should i design my documents differently? or how should i retrieve this data? Matt --0016e6476634b74931048eb0473d--