From derby-user-return-2854-apmail-db-derby-user-archive=db.apache.org@db.apache.org Wed Nov 30 23:59:14 2005 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 89408 invoked from network); 30 Nov 2005 23:59:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Nov 2005 23:59:14 -0000 Received: (qmail 24139 invoked by uid 500); 30 Nov 2005 23:59:12 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 24089 invoked by uid 500); 30 Nov 2005 23:59:11 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 24061 invoked by uid 99); 30 Nov 2005 23:59:11 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2005 15:59:11 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [210.50.55.251] (HELO file1.syd.nuix.com.au) (210.50.55.251) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2005 16:00:40 -0800 Received: from [192.168.222.102] (demo1.syd.nuix.com.au [192.168.222.102]) by file1.syd.nuix.com.au (Postfix) with ESMTP id 618D0B7628 for ; Thu, 1 Dec 2005 10:58:44 +1100 (EST) Message-ID: <438E3E63.4040405@nuix.com.au> Date: Thu, 01 Dec 2005 11:05:55 +1100 From: Daniel Noll Organization: NUIX Pty Limited User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Derby Discussion Subject: Re: Recursive Select for Discussion Forum References: <438344B6.2000003@Sun.COM> <43836274.2010108@sbcglobal.net> <438378FC.1000702@Sun.COM> <4383A4BC.6080603@sbcglobal.net> <4383AE59.6030904@Sun.COM> <438CCE57.5070409@Sun.COM> <438CEA90.8020404@sbcglobal.net> <438D367E.6030305@frontiernet.net> <438D3979.7060806@nuix.com.au> <438D3A4D.3010402@frontiernet.net> In-Reply-To: <438D3A4D.3010402@frontiernet.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Michael McCutcheon wrote: >> I would have done this by having a discussion_id / thread_id column. >> >> A discussion generally has properties of its own, so in a full >> application you would presumably have a discussion or thread table >> already. Selecting all messages in that discussion then becomes a >> trivial matter. >> >> Daniel >> > But then how do you maintain the hierarchy like javalobby? i.e.: > > > > Don't you have to have a parent_id on each item? Yes, you have both. A parent_id for threading the conversation, _and_ a thread_id to make querying for the entire tree more convenient. Daniel -- Daniel Noll NUIX Pty Ltd Level 8, 143 York Street, Sydney 2000 Phone: (02) 9283 9010 Fax: (02) 9283 9020 This message is intended only for the named recipient. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this message or attachment is strictly prohibited.