db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCutcheon <michaelm...@frontiernet.net>
Subject Recursive Select for Discussion Forum
Date Wed, 30 Nov 2005 05:19:58 GMT
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