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 3536F10EE1 for ; Sun, 6 Oct 2013 21:31:37 +0000 (UTC) Received: (qmail 15006 invoked by uid 500); 6 Oct 2013 21:31:35 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 14645 invoked by uid 500); 6 Oct 2013 21:31:34 -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 14637 invoked by uid 99); 6 Oct 2013 21:31:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Oct 2013 21:31:33 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jeff.l@mavericklabel.com designates 209.85.219.44 as permitted sender) Received: from [209.85.219.44] (HELO mail-oa0-f44.google.com) (209.85.219.44) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Oct 2013 21:31:28 +0000 Received: by mail-oa0-f44.google.com with SMTP id l10so5717359oag.3 for ; Sun, 06 Oct 2013 14:31:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=f1us3ojh3FeQR8cxzhR2S04hblFpg8DWb5yyciEB62I=; b=I2ayKlQkBY9zgc3L3/QpPpIURQUPxP5Q/7Rk5OWARStc+IpcPMz4OO9I0NRQpu6cHM D3sqarTNTVA4B4imvsVTcZC1rXjM4rhCnKMl7H9HW2tt0ueoi+67fSF8Hw/Igqfjz1zp kDTV+yX5tjnO6Aln/gJlaNRJuNNtKck8M++TJ8+XOtRYKNLgspGeEuUNolX7NKjzjZBm qWG0Xmt52C9Ns9QvD8E7utvJZWU/ktEDifk2lqUMSbQpV17RJ2mHOFI+bt4a7AqhdJI8 r1d3ITY3UDitap0sVvALvZemjw9+q+6cDKkmRst9e6VQDkiCmGP4L30UpCGBlpCXjPpl qjgw== X-Gm-Message-State: ALoCoQkVuoEA3p2jfW3Vw6bYu15wJ6JaDTG9PZINytK4aoZulb/JxZad/wX0Fx45LWX7/2khlvmt MIME-Version: 1.0 X-Received: by 10.60.96.169 with SMTP id dt9mr42443627oeb.27.1381095067459; Sun, 06 Oct 2013 14:31:07 -0700 (PDT) Received: by 10.60.174.116 with HTTP; Sun, 6 Oct 2013 14:31:07 -0700 (PDT) Date: Sun, 6 Oct 2013 14:31:07 -0700 Message-ID: Subject: Data modeling questions From: "Lowery, Jeff" To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=089e0117601fe5bd1304e819405d X-Virus-Checked: Checked by ClamAV on apache.org --089e0117601fe5bd1304e819405d Content-Type: text/plain; charset=ISO-8859-1 Hi, I'm evaluating CouchDB and have some questions about our domain and how it might be modeled. I have used JMX in the past, so I'm not entirely unfamiliar with key-value data stores. At this stage I'm still trying to formulate the right concepts and questions, so forgive me if I come across as a bit confused. We have product definitions with multiple specs, such as size, shape, material, color. The user is allowed to select a set of spec options for the product they want. However, some options are dependent on others, and the desired workflow does not direct the user toward a particular sequence of option selections. The use cases are: 1) given a partial set of selected spec options, what are the available options in the yet-to-be-selected specs? 2) given a complete complete product definition (all spec options selected), what suppliers support that product definition? My first inclination is to use composite keys based on selected spec options to look up valid values for unselected options.. for example: material spec determines available color spec choices. However, the reverse holds true: color determines material choices. If I understand right, it would require two view definitions, one with a color key, another with a material key, to support both scenarios. But there may actually be compound dependencies: material/color in tandem determines available options for proof (online or none). And proof/color in tandem would determine available material selections. On the supplier case, I may have supplier that doesn't support a particular material, or maybe not a particular material/color combination. Rather than assign every possible product definition to a vendor or vendors that support it, I wonder it there's easy way using wildcards (any shape, any material but red polyvinyl, any size, any color except red if polyvinyl, etc.). It's possible these sort of restrictions might be better encapsulated in a rules engine. >From what I recall of JMX, keys were named and unordered (map-based). If I supplied a set of key/values, all data with those key/value pairs would be returned. It looks as though CouchDB composite keys are array-based and ordered; I'm also not sure that wildcard values ({}) or ranges would work (or be efficient) for any composite value in a composite key query. Anyway, I've got a lot of data I can load up and play with tomorrow and I hope to have more specific questions later. -- Jeff --089e0117601fe5bd1304e819405d--