Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 97537 invoked from network); 9 Nov 2008 15:38:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Nov 2008 15:38:20 -0000 Received: (qmail 13396 invoked by uid 500); 9 Nov 2008 15:38:26 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 13380 invoked by uid 500); 9 Nov 2008 15:38:26 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 13369 invoked by uid 99); 9 Nov 2008 15:38:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Nov 2008 07:38:26 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rrc7cz@gmail.com designates 74.125.46.28 as permitted sender) Received: from [74.125.46.28] (HELO yw-out-2324.google.com) (74.125.46.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Nov 2008 15:37:08 +0000 Received: by yw-out-2324.google.com with SMTP id 9so754132ywe.1 for ; Sun, 09 Nov 2008 07:37:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=uA5cL7TmIwqRLTOXLWRKDThpCZt7CiV/TsRBoLafgCE=; b=WUcSZY07iNEw7LflHhVLDsXFrPZ40ymRNCRAR3T/GmEzB6HhK2qe+6OiVNkNRQomjz AIa4+j5qgWFJsWEt1166bAqesola3qWlrBxlKcePuTTRdz+RrICjnFghpMoMH/qzZpsG vC7NzUX2jfZU/EvFn9SzG0QojFo/gtnpt9hi0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=OpI44TXSWcY3c2E04tA9j9xyC5DKgRxKNgEaOcsqHTQ11D/2h5ZSMbsi7swoUgKnWB uP8b5IGIO+vlvUBZ8Cb1oo/+uUi6Z8mEIN8aXhReIf9lS4ZyuWxo1Q/VxPDvlJtEexWT ztalj8tHZDo7crwyBE4aNRa43EPDcpuFp4UsU= Received: by 10.100.105.15 with SMTP id d15mr1316095anc.69.1226245070688; Sun, 09 Nov 2008 07:37:50 -0800 (PST) Received: by 10.100.46.4 with HTTP; Sun, 9 Nov 2008 07:37:50 -0800 (PST) Message-ID: Date: Sun, 9 Nov 2008 16:37:50 +0100 From: "Robert Campbell" To: users@jackrabbit.apache.org Subject: Re: Node relationships? In-Reply-To: <4916E982.4030606@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4916E982.4030606@gmx.de> X-Virus-Checked: Checked by ClamAV on apache.org Thanks Julian; I've started reading JSR-283 and this Shareable Node is exactly what I need. I looked at the Jackrabbit roadmap, and support for JCR 2.0 is in the "medium term". Does anyone know what this means (generally)? Are we talking months or years? I'm in a bit of a tough spot because if I go forward with my multivalue Category UUID plan, I think that it will be hard to convert the CR to use Sharable Nodes in the future once there are thousands of nodes in there. On the flip side, using the DB option isn't really any better, and it's another entire system. On Sun, Nov 9, 2008 at 2:45 PM, Julian Reschke wrote: > Robert Campbell wrote: >> >> I'm almost done ready the JCR spec, but I don't see any mention of >> this particular problem: >> >> A product node can be the child of multiple category nodes (for >> example). In a RDBMS you can express relationships between entities >> however you wish, in this case I would have a cross-reference table >> with product_id and category_id, resulting in products being mapped to >> as many categories as you want. The JCR, however, lays out a pretty >> strict tree hierarchy preventing multiple parents. >> >> One thought is that I keep the RDBMS for relationship data, and just >> have a column in the products table for UUID pointing to the JCR >> (which would probably just be flat, each node having a UUID, and not >> utilizing the tree structure). This means the DB would have >> relationship data, and the JCR would have entity data. >> >> The other thought is scrap the DB and just have a multivalue Category >> property on all Product nodes containing the UUID of the Category they >> reside in. This feels a bit like a hack, however, and while removing >> the need for the DB to store relationships, it still doesn't make use >> of the tree structure. >> >> I can't be the first one to encounter this problem, but I can't find >> any design patterns to address it. > > I think a multivalued category property should work just fine; but yes, it > doesn't take advantage of hierarchical storage. > > If you *do* want to use that, the Shareable Nodes feature specified in > JSR-283 may be the right thing for you; essentially it allows a single node > to appear below multiple parent nodes (it's almost a one to one match to the > WebDAV BIND specification). > > Best regards, Julian > >