Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 47562 invoked from network); 1 Jun 2010 08:44:55 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Jun 2010 08:44:55 -0000 Received: (qmail 89807 invoked by uid 500); 1 Jun 2010 08:44:54 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 89710 invoked by uid 500); 1 Jun 2010 08:44:53 -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 89702 invoked by uid 99); 1 Jun 2010 08:44:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jun 2010 08:44:53 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [81.103.221.49] (HELO mtaout03-winn.ispmail.ntl.com) (81.103.221.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jun 2010 08:44:46 +0000 Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20100601084418.NLUU3075.mtaout03-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com> for ; Tue, 1 Jun 2010 09:44:18 +0100 Received: from jupiter.ianhobson.co.uk ([86.12.69.89]) by aamtaout03-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20100601084418.QXL1598.aamtaout03-winn.ispmail.ntl.com@jupiter.ianhobson.co.uk> for ; Tue, 1 Jun 2010 09:44:18 +0100 Received: (qmail 28488 invoked by uid 453); 1 Jun 2010 08:44:14 -0000 X-Virus-Checked: Checked by ClamAV on ianhobson.co.uk Received: from moschatel.leda.hcs (HELO [192.168.0.12]) (192.168.0.12) by ianhobson.co.uk (qpsmtpd/0.40) with ESMTP; Tue, 01 Jun 2010 09:44:14 +0100 Message-ID: <4C04C85E.60402@ianhobson.co.uk> Date: Tue, 01 Jun 2010 09:44:14 +0100 From: Ian Hobson User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Re: business model / 'ER' help References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.1 cv=1ggfb5FlKZQUfF3vzm9UBYZ2uTfLsbs/8dSljwg5+mE= c=1 sm=0 a=mI6YO6ZdSLUA:10 a=8nJEP1OIZ-IA:10 a=ia2iezYnAAAA:8 a=KHlq0BM0oSWZlI_o6bMA:9 a=swvRSAWn3xonPdtFe80A:7 a=GpMonE8XnCvhMn4pqdgrHRkwa78A:4 a=wPNLvfGTeEIA:10 a=-8iUzi3HNZ0A:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 On 01/06/10 06:19, Steven.Prentice@nextgen.net wrote: > Excellent proposal Randall, thats an awesome idea, but what if my store > stock a 200 000 of each item - I think your idea defeats the purpose of > storing documents a bit, dont you? I have opted to base my documents on > each product, inside product I have a field called stores which contains > an array of 3 stores each with a name and item count.. and see if I can > tackle it that way. Thoughts? > S > > > If your store has 200,000 of an item is stock at any one time, I rather suspect it does not sell them one at a time! If you sell the item in packs, then the pack is the stock keeping unit, and the database should have one record per pack. For metered products, different answers apply. I rather suspect you will have to keep running totals. regards Ian