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.:

<snip>

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.

Reply via email to