db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCutcheon <michaelm...@frontiernet.net>
Subject Re: Recursive Select for Discussion Forum
Date Wed, 30 Nov 2005 05:36:13 GMT
Daniel Noll wrote:

> Michael McCutcheon wrote:
>
>> <snip>
>> If not, are there any ways of handling scenarios like this without 
>> having to do a select for each item?
>
>
> 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.:

Topic Begin
  |
  response
  response
    |
    response
    |
    response
      |
      response
      response
        |
        response
      |
      response
      response


Don't you have to have a parent_id on each item?

It seems like what you are suggesting is a 'flat' type of forum (which I 
did not think about) where all items have the same parent (for a 
top-level thread), and are shown sorted by date, not by hierarchy.  Is 
that what you are suggesting?

I'm really trying to emulate the behavior of javalobby.

Thanks,

Mike


Mime
View raw message