OK, I looked at the nested sets and they look complex and I looked at the
"with recursive" and it doesn't look like sqlite (which I use for just
hacking around) doesn't support it. So ... any other ideas or do I just need
to suck it up and learn nested sets or suck it up and use a better database.

Scott

On Wed, Oct 28, 2009 at 8:03 AM, Jeremy Evans <[email protected]>wrote:

>
> On Oct 28, 7:28 am, Scott LaBounty <[email protected]> wrote:
> > Jeremy,
> >
> > Thanks for the input. A couple of questions though:
> >
> > I'm not sure what to rename when you say the associations. Do you mean in
> > the table or in the model or both? Also, I'm not sure what a "nested set"
> is
> > in the database world. I'll have to look that up.
>
> I'd rename the foreign key to parent_comment_id.  The associations
> would be:
>
>  many_to_one :parent_comment, :class=>self
>  one_to_many :child_comments, :key=>:parent_comment_id, :class=>self
>
> Nested sets allow you to store hierarchical data in a relational
> database, and make some operations easier.  However, if your database
> supports recursive common table expressions, I would highly recommend
> using a standard tree structure instead.
>
> Jeremy
> >
>


-- 
Scott
http://steamcode.blogspot.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to