I made a lot of that last year... Sometimes it was driving me nuts, needing
to have the same columns for each table in the union... Good naming
convention helps to make thing clearer when you get back to the code...

Note, I would try to make it with web2py first if I were needing to write
those code again.

Richard

On Wed, Apr 11, 2012 at 10:09 AM, Bruce Wade <bruce.w...@gmail.com> wrote:

> Yeah not sure have never used recursion at the database level. However it
> seems to be the only option, none of the other options in that chapter fit
> my needs.
>
>
> On Wed, Apr 11, 2012 at 7:05 AM, Richard Vézina <
> ml.richard.vez...@gmail.com> wrote:
>
>> Recursion is slow because the union... But it may fit yours need better I
>> don't know.
>>
>> Richard
>>
>>
>> On Wed, Apr 11, 2012 at 9:45 AM, Bruce Wade <bruce.w...@gmail.com> wrote:
>>
>>> Ok so I have read the chapter I think the best option is postgres
>>> recursive queries.
>>>
>>> On Tue, Apr 10, 2012 at 10:39 AM, Richard Vézina <
>>> ml.richard.vez...@gmail.com> wrote:
>>>
>>>> Yes AntiPattern cover 4 or 5 kind of tree representation, classify them
>>>> depending of usage and gives pros and cons.
>>>>
>>>> I choose Closure table since it was one of the more complet for my
>>>> case. But if parent node is changing frequently it's not the more effecient
>>>> tree antipattern.
>>>>
>>>> Have look it is pretty instructive.
>>>>
>>>> Book contain little more explanation, but there is this slide :
>>>>
>>>>
>>>> http://www.slideshare.net/billkarwin/practical-object-oriented-models-in-sql
>>>>
>>>> Richard
>>>>
>>>>
>>>> On Tue, Apr 10, 2012 at 7:32 AM, stefaan <stefaan.hi...@gmail.com>wrote:
>>>>
>>>>>
>>>>>
>>>>>
>>>>> Well I know the major bottle neck in the site is the binary tree. I am
>>>>>> still trying to figure out how to do this the best and most efficient.
>>>>>>
>>>>>
>>>>> Maybe this could be useful:
>>>>> http://dirtsimple.org/2010/11/simplest-way-to-do-tree-based-queries.html
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> --
>>> Regards,
>>> Bruce Wade
>>> http://ca.linkedin.com/in/brucelwade
>>> http://www.wadecybertech.com
>>> http://www.fittraineronline.com - Fitness Personal Trainers Online
>>> http://www.warplydesigned.com
>>>
>>>
>>
>
>
> --
> --
> Regards,
> Bruce Wade
> http://ca.linkedin.com/in/brucelwade
> http://www.wadecybertech.com
> http://www.fittraineronline.com - Fitness Personal Trainers Online
> http://www.warplydesigned.com
>
>

Reply via email to