db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suavi Ali Demir <dem...@yahoo.com>
Subject Re: Recursive Select for Discussion Forum
Date Wed, 30 Nov 2005 06:20:35 GMT
You do not necessarily need recursion to do that.
  Check out Ceolko's book for more info:
  This small article has nice images to give you ideas:
  Here is an article by Joe Celko on Hiearchical data and sql:
  There are other ways too, just search on yahoo for hierarchical data sql relational database

Michael McCutcheon <michaelm001@frontiernet.net> wrote:
  I need to implement an online discussion forum, similar to JavaLobby.

Similar kinds of discussion forums tend to use recursive selects, so 
that in a single select, all of the items for a particular discussion 
thread (and all sub threads, and their sub threads, etc) may be retrieved.

For a table, I'm thinking of something like this:

create table discussion_item
id integer not null,
parent_id integer not null,
creator_user_id varchar,
title varchar,
message varchar

There needs to be some kind of recursive functionality to select a item, 
and it's parents, and it's parents, etc.

Does Derby support any kind of recursive selecting? I know that this is 
supported in Oracle and other databases.

If it does not, is it planned to have it in the future?

If not, are there any ways of handling scenarios like this without 
having to do a select for each item?

Thanks for any input.



View raw message