Search Postgresql Archives

Re: For the SQL gurus out there

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- On Wed, 12/12/07, Uwe C. Schroeder <uwe@xxxxxxxxx> wrote:
 
> The comments table also has a field that holds a
> self-reference to comment id 
> for commments on comments (on comments) of a blog.
 
 The model that you are referring to here is the adjacency list hierarchy model.  There are two other models that will give you what you want but are harder to implement: path enumeration model and the nested set model.  My guess is that the path enumeration model with give you what to want with a decent insert performance.  Aside from this there is the ltree contribe module that take care of a lot of the work for you.
  
> What I would like to do is to create a view that sucks the
> comments for a 
> given blog_id in the order they should be displayed (very
> commonly seen in 
> pretty much all blogging apps), i.e.
 
Yup that is the problem with the adjacency list model.
 
Regards,
Richard Broersma Jr.

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux